Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
makramkd committed Dec 13, 2024
1 parent 5489ff9 commit d4bce9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions deployment/ccip/changeset/cs_ccip_home.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,6 @@ func (s SetCandidateChangesetConfig) Validate(e deployment.Environment, state CC
return nil, fmt.Errorf("get node info: %w", err)
}

// TODO: validate token config
// TODO: validate gas config

// check that chain config is set up for the new chain
chainConfig, err := state.Chains[s.HomeChainSelector].CCIPHome.GetChainConfig(nil, s.DONChainSelector)
if err != nil {
Expand All @@ -272,6 +269,9 @@ func (s SetCandidateChangesetConfig) Validate(e deployment.Environment, state CC
return nil, fmt.Errorf("invalid ccip ocr params: %w", err)
}

// TODO: validate token config in the commit config, if commit is the plugin.
// TODO: validate gas config in the chain config in cciphome for this DONChainSelector.

if e.OCRSecrets.IsEmpty() {
return nil, fmt.Errorf("OCR secrets must be set")
}
Expand Down
6 changes: 2 additions & 4 deletions deployment/ccip/changeset/cs_ccip_home_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ func Test_RevokeCandidate(t *testing.T) {
}
}
tokenConfig := NewTestTokenConfig(state.Chains[tenv.FeedChainSel].USDFeeds)
_, err = commonchangeset.ApplyChangesets(t, tenv.Env, map[uint64]*commonchangeset.TimelockExecutionContracts{
_, err = commonchangeset.ApplyChangesets(t, tenv.Env, map[uint64]*proposalutils.TimelockExecutionContracts{
tenv.HomeChainSel: {
Timelock: state.Chains[tenv.HomeChainSel].Timelock,
CallProxy: state.Chains[tenv.HomeChainSel].CallProxy,
Expand All @@ -552,7 +552,6 @@ func Test_RevokeCandidate(t *testing.T) {
FeedChainSelector: tenv.FeedChainSel,
DONChainSelector: dest,
PluginType: types.PluginTypeCCIPCommit,
NodeIDs: nodeIDs,
CCIPOCRParams: DefaultOCRParams(
tenv.FeedChainSel,
tokenConfig.GetTokenInfo(logger.TestLogger(t), state.Chains[dest].LinkToken, state.Chains[dest].Weth9),
Expand All @@ -568,7 +567,6 @@ func Test_RevokeCandidate(t *testing.T) {
FeedChainSelector: tenv.FeedChainSel,
DONChainSelector: dest,
PluginType: types.PluginTypeCCIPExec,
NodeIDs: nodeIDs,
CCIPOCRParams: DefaultOCRParams(
tenv.FeedChainSel,
tokenConfig.GetTokenInfo(logger.TestLogger(t), state.Chains[dest].LinkToken, state.Chains[dest].Weth9),
Expand Down Expand Up @@ -597,7 +595,7 @@ func Test_RevokeCandidate(t *testing.T) {
require.NotEqual(t, candidateDigestExecBefore, candidateDigestExecAfter)

// next we can revoke candidate - this should set the candidate digest back to zero
_, err = commonchangeset.ApplyChangesets(t, tenv.Env, map[uint64]*commonchangeset.TimelockExecutionContracts{
_, err = commonchangeset.ApplyChangesets(t, tenv.Env, map[uint64]*proposalutils.TimelockExecutionContracts{
tenv.HomeChainSel: {
Timelock: state.Chains[tenv.HomeChainSel].Timelock,
CallProxy: state.Chains[tenv.HomeChainSel].CallProxy,
Expand Down

0 comments on commit d4bce9a

Please sign in to comment.