From 95fd35a483f51e6e62e9a429b29706bb94b2564e Mon Sep 17 00:00:00 2001 From: connorwstein Date: Wed, 20 Nov 2024 09:45:11 -0500 Subject: [PATCH] Move more files --- deployment/ccip/{ => changeset}/deploy.go | 0 deployment/ccip/{ => changeset}/deploy_test.go | 0 deployment/ccip/changeset/initial_deploy.go | 2 +- deployment/ccip/{ => changeset}/jobs.go | 11 +++++------ deployment/ccip/changeset/jobspec.go | 3 +-- deployment/ccip/changeset/test_helpers.go | 2 +- 6 files changed, 8 insertions(+), 10 deletions(-) rename deployment/ccip/{ => changeset}/deploy.go (100%) rename deployment/ccip/{ => changeset}/deploy_test.go (100%) rename deployment/ccip/{ => changeset}/jobs.go (85%) diff --git a/deployment/ccip/deploy.go b/deployment/ccip/changeset/deploy.go similarity index 100% rename from deployment/ccip/deploy.go rename to deployment/ccip/changeset/deploy.go diff --git a/deployment/ccip/deploy_test.go b/deployment/ccip/changeset/deploy_test.go similarity index 100% rename from deployment/ccip/deploy_test.go rename to deployment/ccip/changeset/deploy_test.go diff --git a/deployment/ccip/changeset/initial_deploy.go b/deployment/ccip/changeset/initial_deploy.go index de17834e8bd..5d9a9d0b91c 100644 --- a/deployment/ccip/changeset/initial_deploy.go +++ b/deployment/ccip/changeset/initial_deploy.go @@ -17,7 +17,7 @@ func InitialDeploy(env deployment.Environment, c ccipdeployment.DeployCCIPContra env.Logger.Errorw("Failed to deploy CCIP contracts", "err", err, "newAddresses", newAddresses) return deployment.ChangesetOutput{AddressBook: newAddresses}, deployment.MaybeDataErr(err) } - js, err := ccipdeployment.NewCCIPJobSpecs(env.NodeIDs, env.Offchain) + js, err := NewCCIPJobSpecs(env.NodeIDs, env.Offchain) if err != nil { return deployment.ChangesetOutput{AddressBook: newAddresses}, err } diff --git a/deployment/ccip/jobs.go b/deployment/ccip/changeset/jobs.go similarity index 85% rename from deployment/ccip/jobs.go rename to deployment/ccip/changeset/jobs.go index 4cd3a619153..5cfe112ff53 100644 --- a/deployment/ccip/jobs.go +++ b/deployment/ccip/changeset/jobs.go @@ -1,8 +1,7 @@ -package ccipdeployment +package changeset import ( "github.com/smartcontractkit/chainlink/deployment" - "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/validate" "github.com/smartcontractkit/chainlink/v2/core/services/relay" ) @@ -27,8 +26,8 @@ func NewCCIPJobSpecs(nodeIds []string, oc deployment.OffchainClient) (map[string if !node.IsBootstrap { spec, err = validate.NewCCIPSpecToml(validate.SpecArgs{ P2PV2Bootstrappers: nodes.BootstrapLocators(), - CapabilityVersion: changeset.CapabilityVersion, - CapabilityLabelledName: changeset.CapabilityLabelledName, + CapabilityVersion: CapabilityVersion, + CapabilityLabelledName: CapabilityLabelledName, OCRKeyBundleIDs: map[string]string{ // TODO: Validate that that all EVM chains are using the same keybundle. relay.NetworkEVM: node.FirstOCRKeybundle().KeyBundleID, @@ -40,8 +39,8 @@ func NewCCIPJobSpecs(nodeIds []string, oc deployment.OffchainClient) (map[string } else { spec, err = validate.NewCCIPSpecToml(validate.SpecArgs{ P2PV2Bootstrappers: []string{}, // Intentionally empty for bootstraps. - CapabilityVersion: changeset.CapabilityVersion, - CapabilityLabelledName: changeset.CapabilityLabelledName, + CapabilityVersion: CapabilityVersion, + CapabilityLabelledName: CapabilityLabelledName, OCRKeyBundleIDs: map[string]string{}, // TODO: validate that all EVM chains are using the same keybundle P2PKeyID: node.PeerID.String(), diff --git a/deployment/ccip/changeset/jobspec.go b/deployment/ccip/changeset/jobspec.go index 76352ff364f..bd968c97e1e 100644 --- a/deployment/ccip/changeset/jobspec.go +++ b/deployment/ccip/changeset/jobspec.go @@ -5,11 +5,10 @@ import ( "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/timelock" "github.com/smartcontractkit/chainlink/deployment" - ccipdeployment "github.com/smartcontractkit/chainlink/deployment/ccip" ) func Jobspec(env deployment.Environment, _ any) (deployment.ChangesetOutput, error) { - js, err := ccipdeployment.NewCCIPJobSpecs(env.NodeIDs, env.Offchain) + js, err := NewCCIPJobSpecs(env.NodeIDs, env.Offchain) if err != nil { return deployment.ChangesetOutput{}, errors.Wrapf(err, "failed to create job specs") } diff --git a/deployment/ccip/changeset/test_helpers.go b/deployment/ccip/changeset/test_helpers.go index 38490e9f9eb..a73075d7bf2 100644 --- a/deployment/ccip/changeset/test_helpers.go +++ b/deployment/ccip/changeset/test_helpers.go @@ -87,7 +87,7 @@ type DeployedEnv struct { func (e *DeployedEnv) SetupJobs(t *testing.T) { ctx := testcontext.Get(t) - jbs, err := ccipdeployment.NewCCIPJobSpecs(e.Env.NodeIDs, e.Env.Offchain) + jbs, err := NewCCIPJobSpecs(e.Env.NodeIDs, e.Env.Offchain) require.NoError(t, err) for nodeID, jobs := range jbs { for _, job := range jobs {