Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AnieeG committed Dec 5, 2024
1 parent a13c2f4 commit be1eed6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
10 changes: 2 additions & 8 deletions deployment/ccip/changeset/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/pkg/errors"
chainsel "github.com/smartcontractkit/chain-selectors"

"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/deployment/ccip/view"
Expand Down Expand Up @@ -242,12 +241,7 @@ type CCIPOnChainState struct {
func (s CCIPOnChainState) View(chains []uint64) (map[string]view.ChainView, error) {
m := make(map[string]view.ChainView)
for _, chainSelector := range chains {
// TODO: Need a utility for this
chainid, err := chainsel.ChainIdFromSelector(chainSelector)
if err != nil {
return m, err
}
chainName, err := chainsel.NameFromChainId(chainid)
chainInfo, err := deployment.ChainInfo(chainSelector)
if err != nil {
return m, err
}
Expand All @@ -259,7 +253,7 @@ func (s CCIPOnChainState) View(chains []uint64) (map[string]view.ChainView, erro
if err != nil {
return m, err
}
m[chainName] = chainView
m[chainInfo.ChainName] = chainView
}
return m, nil
}
Expand Down
3 changes: 2 additions & 1 deletion deployment/environment/memory/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package memory
import (
"context"
"fmt"
"strconv"
"testing"

"github.com/ethereum/go-ethereum/accounts/abi/bind"
Expand Down Expand Up @@ -69,7 +70,7 @@ func generateMemoryChain(t *testing.T, inputs map[uint64]EVMChain) map[uint64]de
chains := make(map[uint64]deployment.Chain)
for cid, chain := range inputs {
chain := chain
chainInfo, err := deployment.ChainInfo(cid)
chainInfo, err := chainsel.GetChainDetailsByChainIDAndFamily(strconv.FormatUint(cid, 10), chainsel.FamilyEVM)
require.NoError(t, err)
backend := NewBackend(chain.Backend)
chains[chainInfo.ChainSelector] = deployment.Chain{
Expand Down

0 comments on commit be1eed6

Please sign in to comment.