Skip to content
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

solana: Remove *_multisig instruction variants #593

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

nvsriram
Copy link
Collaborator

@nvsriram nvsriram commented Mar 5, 2025

This PR adds:

  • Remove initialize_multisig and release_inbound_mint_multisig ix
  • Add Option<'info, SplMultisig<'info>> account to Initialize and ReleaseInboundMint struct
  • Update cargo and TS tests
  • Derive multisig token authority from the token mint authority
  • Update IDL

@nvsriram
Copy link
Collaborator Author

nvsriram commented Mar 5, 2025

As this PR introduces breaking changes to initialize and release_inbound_mint, this PR also covers breaking changes to release_inbound_* - introduced by #336.

@nvsriram nvsriram marked this pull request as ready for review March 5, 2025 22:08
@nonergodic
Copy link
Collaborator

nonergodic commented Mar 6, 2025

Btw, I like the streamlining of integrating the multisig handling in the respective instructions instead of doing the ix multiplexing 👍

nvsriram and others added 14 commits March 6, 2025 11:02
There are a few suspicious aspects of the inbox release logic:
1. `release_inbound_unlock` takes a flag that determines whether a
   `false` result from `try_release` should cause an error. The flag
   indicates that it should revert on delay. However, `try_release` can
   also return `false` when a transaction has not been approved. If the
   flag is set, the transaction will not return an error when a user
   tries to release a transaction that is not approved even though
   whether a transaction is approved has nothing to do with its expected
   behaviour when it is delayed
2. The custom error TransferNotApproved is defined but unused

Taken together, I believe `try_release()` should revert with the
TransferNotApproved error. This would disambiguate the various 'false'
results and provide more intuitive behaviour when a user tries to
release a transaction that is not approved.
@nvsriram nvsriram force-pushed the solana/remove-multisig-variants branch from 060499f to cc573c3 Compare March 6, 2025 16:02
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.

3 participants