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

fix(svm): N-04 reset use of PDA signer in multicall handler #837

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion programs/multicall-handler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ pub mod multicall_handler {
pub fn handle_v3_across_message(ctx: Context<HandleV3AcrossMessage>, message: Vec<u8>) -> Result<()> {
// Some instructions might require being signed by handler PDA.
let (handler_signer, bump) = Pubkey::find_program_address(&[b"handler_signer"], &crate::ID);
let mut use_handler_signer = false;

let compiled_ixs: Vec<CompiledIx> = AnchorDeserialize::deserialize(&mut &message[..])?;

for compiled_ix in compiled_ixs {
// Will only sign with handler PDA if it is included in this instruction's accounts (checked below).
let mut use_handler_signer = false;

let mut accounts = Vec::with_capacity(compiled_ix.account_key_indexes.len());
let mut account_infos = Vec::with_capacity(compiled_ix.account_key_indexes.len());

Expand Down
Loading