-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
USDC token pool changesets (+ token pool patches) #16062
Open
kylesmartin
wants to merge
66
commits into
develop
Choose a base branch
from
CCIP-4507
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
69d1ae0
Add changeset
kylesmartin b85e787
Add first working test
kylesmartin 9abacee
Make fns private
kylesmartin 04b9913
Add more use case tests
kylesmartin 335b968
Unit tests for validations and deployment fns
kylesmartin 02ee1f9
Linting
kylesmartin 7864db8
More linting
kylesmartin db2d7c5
goimports formatting
kylesmartin 820974a
Test fixes
kylesmartin 10bc710
Merge branch 'develop' into CCIP-4508
kylesmartin 4127793
Refactor into 3 changesets
kylesmartin 229ff21
Finish token pool configuration tests
kylesmartin 3076551
Merge from develop
kylesmartin b203501
Align with test package conventions
kylesmartin 8edc98d
Linting
kylesmartin a8b6a27
goimports
kylesmartin 4839580
More tests & goimports
kylesmartin dd3bc58
Merge branch 'develop' into CCIP-4508
kylesmartin 6f90004
chain.Name to chain.String
kylesmartin 7f33530
Update tests
kylesmartin d66f952
Goimports
kylesmartin 18efab5
Use confirm if no error
kylesmartin a6be556
Comments
kylesmartin 3ee1cda
Merge branch 'develop' into CCIP-4508
kylesmartin d7ade58
Remove addresses as inputs
kylesmartin 92ce147
Deployer group integration & improvements
kylesmartin 8015099
Estimate gas limit
kylesmartin 197c6e1
Comments
kylesmartin 749dced
Merge branch 'develop' into CCIP-4508
kylesmartin 2dbdd3d
Remove unstable test
kylesmartin 8b35cbf
Move fn to helpers
kylesmartin 1f98c6d
Fix deployer group
kylesmartin 549466b
Buildfix
kylesmartin b774023
Merge branch 'develop' into CCIP-4508
kylesmartin 19fe9b4
Sync ccip rmn test with develop
kylesmartin 4637e30
goimports
kylesmartin e81639e
Merge branch 'develop' into CCIP-4508
kylesmartin bb6e198
Clean up token admin registry changeset
kylesmartin 3824227
Merge from develop
kylesmartin ffd7940
More comments
kylesmartin ed01ffe
Revert deployer group, add opCount offset capability
kylesmartin 78e8bd8
goimports
kylesmartin 488554c
Split out token admin reg changesets
kylesmartin 94e6227
Revert propose.go
kylesmartin de243ba
Merge branch 'develop' into CCIP-4508
kylesmartin afc13ca
Comments
kylesmartin 12274a0
Merge branch 'develop' into CCIP-4508
kylesmartin 78885cb
Fix build
kylesmartin 75052de
Add deployment changeset
kylesmartin c22645f
Lint, remove forceDeployment
kylesmartin 3319050
Merge branch 'develop' into CCIP-4508
kylesmartin 9e1065d
Merge branch 'CCIP-4508' into CCIP-4507
kylesmartin 3ae0505
Add sync changeset
kylesmartin 8ced0ef
Merge from develop
kylesmartin 9b371f4
Merge branch 'develop' into CCIP-4507
kylesmartin b766a29
Deployment test
kylesmartin f3ac552
Set USDC token pool to correct version
kylesmartin a4bea64
Lint
kylesmartin 7f40e8b
Add tests for sync changeset
kylesmartin 2e97971
Merge branch 'develop' into CCIP-4507
kylesmartin c9ec8b8
Lint
kylesmartin 705b311
Lint
kylesmartin 6289035
Comments
kylesmartin 9a68a11
Merge branch 'develop' into CCIP-4507
kylesmartin cb0fe56
Merge branch 'develop' into CCIP-4507
kylesmartin 8d1f336
Comments
kylesmartin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 token pool with address %s on chain %s with token pool bindings: %w", tokenPoolAddress, chain, 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) | ||
} | ||
|
||
|
@@ -146,13 +150,11 @@ func (c ConfigureTokenPoolContractsConfig) Validate(env deployment.Environment) | |
if tokenAdminRegistry := chainState.TokenAdminRegistry; tokenAdminRegistry == nil { | ||
return fmt.Errorf("missing tokenAdminRegistry on %s", chain.String()) | ||
} | ||
if c.MCMS != nil { | ||
if timelock := chainState.Timelock; timelock == nil { | ||
return fmt.Errorf("missing timelock on %s", chain.String()) | ||
} | ||
if proposerMcm := chainState.ProposerMcm; proposerMcm == nil { | ||
return fmt.Errorf("missing proposerMcm on %s", chain.String()) | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Made this change in two places. We need the timelock to be non-nil regardless because we pass its address as input to ValidateOwnership. |
||
if timelock := chainState.Timelock; timelock == nil { | ||
kylesmartin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return fmt.Errorf("missing timelock on %s", chain.String()) | ||
} | ||
if proposerMcm := chainState.ProposerMcm; proposerMcm == nil { | ||
kylesmartin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return fmt.Errorf("missing proposerMcm on %s", chain.String()) | ||
} | ||
if err := poolUpdate.Validate(env.GetContext(), chain, chainState, c.MCMS != nil, c.TokenSymbol); err != nil { | ||
return fmt.Errorf("invalid pool update on %s: %w", chain.String(), err) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue I found with the configure TP changeset, was validating ownership against wrong contract.