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

revert test #16530

Closed
wants to merge 1 commit into from
Closed
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
40 changes: 18 additions & 22 deletions deployment/ccip/changeset/solana/cs_deploy_chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset"
cs "github.com/smartcontractkit/chainlink/deployment/ccip/changeset"
cs_solana "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/solana"
solanachangesets "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/solana"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers"
"github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_6"
"github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
Expand Down Expand Up @@ -59,26 +60,11 @@
feeAggregatorPrivKey, _ := solana.NewRandomPrivateKey()
feeAggregatorPubKey := feeAggregatorPrivKey.PublicKey()
ci := os.Getenv("CI") == "true"
// we can't upgrade in place locally so we have to change where we build
buildCs := commonchangeset.Configure(
deployment.CreateLegacyChangeSet(cs_solana.BuildSolanaChangeset),
cs_solana.BuildSolanaConfig{
ChainSelector: solChainSelectors[0],
GitCommitSha: "0863d8fed5fbada9f352f33c405e1753cbb7d72c",
DestinationDir: e.SolChains[solChainSelectors[0]].ProgramsPath,
CleanDestinationDir: true,
},
)
if ci {
testhelpers.SavePreloadedSolAddresses(t, e, solChainSelectors[0])
} else {
e, err = commonchangeset.ApplyChangesetsV2(t, e, []commonchangeset.ConfiguredChangeSet{
buildCs,
})
require.NoError(t, err)
}

e, err = commonchangeset.ApplyChangesetsV2(t, e, []commonchangeset.ConfiguredChangeSet{
e, err = commonchangeset.Apply(t, e, nil,

Check failure on line 67 in deployment/ccip/changeset/solana/cs_deploy_chain_test.go

View workflow job for this annotation

GitHub Actions / GolangCI Lint (deployment)

ineffectual assignment to err (ineffassign)
commonchangeset.Configure(
deployment.CreateLegacyChangeSet(v1_6.DeployHomeChainChangeset),
v1_6.DeployHomeChainConfig{
Expand Down Expand Up @@ -128,8 +114,7 @@
},
},
),
})
require.NoError(t, err)
)
addresses, err := e.ExistingAddresses.AddressesForChain(solChainSelectors[0])
require.NoError(t, err)
mcmState, err := commonState.MaybeLoadMCMSWithTimelockChainStateSolana(e.SolChains[solChainSelectors[0]], addresses)
Expand All @@ -145,6 +130,16 @@
t.Logf("funded mcm signer PDA: %s", mcmSignerPDA.String())
upgradeAuthority := timelockSignerPDA

// we can't upgrade in place locally so we have to change where we build
buildCs := commonchangeset.Configure(
deployment.CreateLegacyChangeSet(cs_solana.BuildSolanaChangeset),
cs_solana.BuildSolanaConfig{
ChainSelector: solChainSelectors[0],
GitCommitSha: "0863d8fed5fbada9f352f33c405e1753cbb7d72c",
DestinationDir: e.SolChains[solChainSelectors[0]].ProgramsPath,
CleanDestinationDir: true,
},
)
deployCs := commonchangeset.Configure(
deployment.CreateLegacyChangeSet(cs_solana.DeployChainContractsChangesetSolana),
cs_solana.DeployChainContractsConfigSolana{
Expand All @@ -168,10 +163,10 @@
},
)
transferOwnershipCs := commonchangeset.Configure(
deployment.CreateLegacyChangeSet(cs_solana.TransferCCIPToMCMSWithTimelockSolana),
cs_solana.TransferCCIPToMCMSWithTimelockSolanaConfig{
deployment.CreateLegacyChangeSet(solanachangesets.TransferCCIPToMCMSWithTimelockSolana),
solanachangesets.TransferCCIPToMCMSWithTimelockSolanaConfig{
MinDelay: 1 * time.Second,
ContractsByChain: map[uint64]cs_solana.CCIPContractsToTransfer{
ContractsByChain: map[uint64]solanachangesets.CCIPContractsToTransfer{
solChainSelectors[0]: {
Router: true,
FeeQuoter: true,
Expand Down Expand Up @@ -262,11 +257,11 @@
require.NotEqual(t, oldOffRampAddress, newOffRampAddress)
} else {
e, err = commonchangeset.ApplyChangesetsV2(t, e, []commonchangeset.ConfiguredChangeSet{
buildCs,
deployCs,
feeAggregatorCs,
upgradeAuthorityCs,
upgradeCs,
transferOwnershipCs,
})
}
require.NoError(t, err)
Expand Down Expand Up @@ -298,4 +293,5 @@
require.NoError(t, err)
// solana verification
testhelpers.ValidateSolanaState(t, e, solChainSelectors)

}
Loading