Skip to content

Commit

Permalink
fix: on SVM collateral warp routes, specify the mint when transferrin…
Browse files Browse the repository at this point in the history
…g out as readonly (#4905)

### Description

- This was surfaced a while back but we never made the tweak -- on the
collateral warp routes, the account infos exposed to the relayer
informing it how to process a message ask for the token mint to be
writeable. This isn't necessary - it can be read-only because nothing is
changing in the data of the token mint. A consequence of this is that we
need to pay higher fees for accounts that have very high contention
(like USDC)
- We have strong test coverage here - if this change wasn't possible,
our Sealevel tests would fail

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
  • Loading branch information
tkporter authored Dec 12, 2024
1 parent 4515c83 commit f9396fc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ impl HyperlaneSealevelTokenPlugin for CollateralPlugin {
vec![
AccountMeta::new_readonly(token.plugin_data.spl_token_program, false).into(),
AccountMeta::new_readonly(spl_associated_token_account::id(), false).into(),
AccountMeta::new(token.plugin_data.mint, false).into(),
AccountMeta::new_readonly(token.plugin_data.mint, false).into(),
AccountMeta::new(recipient_associated_token_account, false).into(),
AccountMeta::new(ata_payer_account_key, false).into(),
AccountMeta::new(token.plugin_data.escrow, false).into(),
Expand Down

0 comments on commit f9396fc

Please sign in to comment.