Skip to content

Commit

Permalink
Patch token pool ownership validation (#16262)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylesmartin authored Feb 10, 2025
1 parent cb77616 commit 978533a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deployment/ccip/changeset/cs_configure_token_pools.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,13 @@ func (c TokenPoolConfig) Validate(ctx context.Context, chain deployment.Chain, s
if !ok {
return fmt.Errorf("token pool does not exist on %s with symbol %s, type %s, and version %s", chain.String(), tokenSymbol, c.Type, c.Version)
}
tokenPool, err := token_pool.NewTokenPool(tokenPoolAddress, chain.Client)
if err != nil {
return fmt.Errorf("failed to connect address %s with token pool bindings: %w", tokenPoolAddress, err)
}

// Validate that the token pool is owned by the address that will be actioning the transactions (i.e. Timelock or deployer key)
if err := commoncs.ValidateOwnership(ctx, useMcms, chain.DeployerKey.From, state.Timelock.Address(), state.TokenAdminRegistry); err != nil {
if err := commoncs.ValidateOwnership(ctx, useMcms, chain.DeployerKey.From, state.Timelock.Address(), tokenPool); err != nil {
return fmt.Errorf("token pool with address %s on %s failed ownership validation: %w", tokenPoolAddress, chain.String(), err)
}

Expand Down

0 comments on commit 978533a

Please sign in to comment.