Skip to content

Commit afc341e

Browse files
Add missing version check (#760)
1 parent 1df481f commit afc341e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

chains/solana/contracts/programs/ccip-router/src/token_context.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub struct RegisterTokenAdminRegistryByCCIPAdmin<'info> {
2525
bump,
2626
payer = authority,
2727
space = ANCHOR_DISCRIMINATOR + TokenAdminRegistry::INIT_SPACE,
28+
constraint = uninitialized(token_admin_registry.version) @ CcipRouterError::InvalidVersion,
2829
)]
2930
pub token_admin_registry: Account<'info, TokenAdminRegistry>,
3031
pub mint: InterfaceAccount<'info, Mint>, // underlying token that the pool wraps

0 commit comments

Comments
 (0)