Skip to content

Conversation

@thmzlt
Copy link

@thmzlt thmzlt commented Dec 16, 2025

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.

@thmzlt thmzlt marked this pull request as ready for review December 16, 2025 20:54
Copy link
Contributor

@guibescos guibescos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor comments

@@ -1,14 +1,17 @@
[toolchain]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this section seems emtpy

newAuthority: newAuthority,
programAccount: programToTransfer,
})
.accountsPartial({
Copy link
Contributor

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

transaction: T
): Promise<T> {
if (transaction instanceof VersionedTransaction) {
throw new Error("VersionedTransaction not supported by Ledger");
Copy link
Contributor

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

if (multisigAddress) {
[newAuthority] = getAuthorityPDA(
multisigAddress,
new BN(1),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're supposed to use the authority index that's specified in the multisig account (you can get it by calling getMultisig)


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`
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants