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

Omit non required contracts #1158

Merged
merged 3 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
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
46 changes: 25 additions & 21 deletions integration-tests/ccip-tests/actions/ccip_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1000,24 +1000,26 @@ func (ccipModule *CCIPCommon) DeployContracts(
}

// no need to have price registry for existing deployment, we consider that it's already deployed
if ccipModule.PriceRegistry == nil && !ccipModule.ExistingDeployment {
// we will update the price updates later based on source and dest PriceUpdates
ccipModule.PriceRegistry, err = cd.DeployPriceRegistry(
[]common.Address{
common.HexToAddress(ccipModule.FeeToken.Address()),
common.HexToAddress(ccipModule.WrappedNative.Hex()),
})
if err != nil {
return fmt.Errorf("deploying PriceRegistry shouldn't fail %w", err)
}
err = ccipModule.ChainClient.WaitForEvents()
if err != nil {
return fmt.Errorf("error in waiting for PriceRegistry deployment %w", err)
}
} else {
ccipModule.PriceRegistry, err = cd.NewPriceRegistry(ccipModule.PriceRegistry.EthAddress)
if err != nil {
return fmt.Errorf("getting new PriceRegistry contract shouldn't fail %w", err)
if !ccipModule.ExistingDeployment {
if ccipModule.PriceRegistry == nil {
// we will update the price updates later based on source and dest PriceUpdates
ccipModule.PriceRegistry, err = cd.DeployPriceRegistry(
[]common.Address{
common.HexToAddress(ccipModule.FeeToken.Address()),
common.HexToAddress(ccipModule.WrappedNative.Hex()),
})
if err != nil {
return fmt.Errorf("deploying PriceRegistry shouldn't fail %w", err)
}
err = ccipModule.ChainClient.WaitForEvents()
if err != nil {
return fmt.Errorf("error in waiting for PriceRegistry deployment %w", err)
}
} else {
ccipModule.PriceRegistry, err = cd.NewPriceRegistry(ccipModule.PriceRegistry.EthAddress)
if err != nil {
return fmt.Errorf("getting new PriceRegistry contract shouldn't fail %w", err)
}
}
}
if ccipModule.MulticallContract == (common.Address{}) && ccipModule.MulticallEnabled {
Expand Down Expand Up @@ -1210,9 +1212,11 @@ func NewCCIPCommonFromConfig(
if err != nil {
return nil, err
}
newCCIPModule.PriceRegistry, err = newCCIPModule.Deployer.NewPriceRegistry(common.HexToAddress(newCCIPModule.PriceRegistry.Address()))
if err != nil {
return nil, err
if newCCIPModule.PriceRegistry != nil {
newCCIPModule.PriceRegistry, err = newCCIPModule.Deployer.NewPriceRegistry(common.HexToAddress(newCCIPModule.PriceRegistry.Address()))
if err != nil {
return nil, err
}
}
newCCIPModule.Router, err = newCCIPModule.Deployer.NewRouter(common.HexToAddress(newCCIPModule.Router.Address()))
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions integration-tests/ccip-tests/testsetups/ccip.go
Original file line number Diff line number Diff line change
Expand Up @@ -1240,9 +1240,9 @@ func (o *CCIPTestSetUpOutputs) CreateEnvironment(

func createEnvironmentConfig(t *testing.T, envName string, testConfig *CCIPTestConfig, reportPath string) *environment.Config {
envConfig := &environment.Config{
NamespacePrefix: envName,
Test: t,
PreventPodEviction: true,
NamespacePrefix: envName,
Test: t,
// PreventPodEviction: true, //TODO: enable this once we have a way to handle pod eviction
}
if pointer.GetBool(testConfig.TestGroupInput.StoreLaneConfig) {
envConfig.ReportPath = reportPath
Expand Down
Loading