Skip to content

Commit

Permalink
Fix import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
connorwstein committed Aug 8, 2024
1 parent 3c961ed commit 6373a5d
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 18 deletions.
1 change: 0 additions & 1 deletion integration-tests/deployment/address_book_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ func TestAddressBook(t *testing.T) {
},
})

// TODO: Further testing of merge etc.
}
4 changes: 3 additions & 1 deletion integration-tests/deployment/ccip/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package deployment

import (
"github.com/ethereum/go-ethereum/common"
"github.com/smartcontractkit/ccip/integration-tests/deployment"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"

"github.com/smartcontractkit/chainlink-common/pkg/logger"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/arm_proxy_contract"
Expand Down Expand Up @@ -62,6 +63,7 @@ func GenerateJobSpecs(capReg common.Address) (CCIPSpec, error) {
}

type DeployCCIPContractConfig struct {
// Existing addresses which we want to skip deployment
Weth9s map[uint64]common.Address
// TODO: More params as needed
}
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/deployment/ccip/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package deployment
import (
"testing"

"github.com/smartcontractkit/ccip/integration-tests/deployment"
chainsel "github.com/smartcontractkit/chain-selectors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
)

func TestDeployCCIPContracts(t *testing.T) {
Expand Down
22 changes: 12 additions & 10 deletions integration-tests/deployment/ccip/migrations/1_initial_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,37 @@ package migrations

import (
"github.com/ethereum/go-ethereum/common"
deployment2 "github.com/smartcontractkit/ccip/integration-tests/deployment"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"

ccipdeployment "github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip"
)

// We expect the migration input to be unique per migration.
// TODO: Maybe there's a generics approach here?
func Apply0001(env deployment2.Environment, c ccipdeployment.DeployCCIPContractConfig) (deployment2.MigrationOutput, error) {
// Note if the migration is a deployment and it fails we have 2 options:
// - Just throw away the addresses, fix issue and try again (potentially expensive on mainnet)
// - Roll forward with another migration completing the deployment
func Apply0001(env deployment.Environment, c ccipdeployment.DeployCCIPContractConfig) (deployment.MigrationOutput, error) {
ab, err := ccipdeployment.DeployCCIPContracts(env, c)
if err != nil {
// If we fail here, just throw away the addresses.
// TODO: if expensive could consider partial recovery
env.Logger.Errorw("Failed to deploy CCIP contracts", "err", err, "addresses", ab)
return deployment2.MigrationOutput{}, err
return deployment.MigrationOutput{}, err
}
state, err := ccipdeployment.GenerateOnchainState(env, ab)
if err != nil {
return deployment2.MigrationOutput{}, err
return deployment.MigrationOutput{}, err
}
js, err := ccipdeployment.GenerateJobSpecs(common.Address{})
if err != nil {
return deployment2.MigrationOutput{}, err
return deployment.MigrationOutput{}, err
}
proposal, err := ccipdeployment.GenerateAcceptOwnershipProposal(env, env.AllChainSelectors(), state)
if err != nil {
return deployment2.MigrationOutput{}, err
return deployment.MigrationOutput{}, err
}
return deployment2.MigrationOutput{
Proposals: []deployment2.Proposal{proposal},
return deployment.MigrationOutput{
Proposals: []deployment.Proposal{proposal},
AddressBook: ab,
JobSpecs: map[string][]string{
"chain-layer": {js.String()},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"context"
"testing"

"github.com/smartcontractkit/ccip/integration-tests/deployment"
"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"

ccipdeployment "github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip"
)

Expand Down
3 changes: 2 additions & 1 deletion integration-tests/deployment/ccip/propose.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"time"

"github.com/ethereum/go-ethereum/common"
deployment2 "github.com/smartcontractkit/ccip/integration-tests/deployment"
chainsel "github.com/smartcontractkit/chain-selectors"

deployment2 "github.com/smartcontractkit/chainlink/integration-tests/deployment"
)

func GenerateAcceptOwnershipProposal(
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/deployment/ccip/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/pkg/errors"
deployment2 "github.com/smartcontractkit/ccip/integration-tests/deployment"
chainsel "github.com/smartcontractkit/chain-selectors"

deployment2 "github.com/smartcontractkit/chainlink/integration-tests/deployment"

"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/arm_proxy_contract"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_multi_offramp"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_multi_onramp"
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/deployment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap/zapcore"

"github.com/smartcontractkit/ccip/integration-tests/deployment/memory"
"github.com/smartcontractkit/chainlink/integration-tests/deployment/memory"

"github.com/smartcontractkit/chainlink-common/pkg/logger"
)
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/docker/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra"
"github.com/testcontainers/testcontainers-go"

"github.com/smartcontractkit/ccip/integration-tests/docker/cmd/internal"
"github.com/smartcontractkit/chainlink/integration-tests/docker/cmd/internal"
)

var rootCmd = &cobra.Command{
Expand Down

0 comments on commit 6373a5d

Please sign in to comment.