Skip to content

Commit

Permalink
Adding solchains in NewEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
yashnevatia committed Jan 3, 2025
1 parent 945c706 commit aaab52e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions deployment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func NewEnvironment(
logger logger.Logger,
existingAddrs AddressBook,
chains map[uint64]Chain,
solChains map[uint64]SolChain,
nodeIDs []string,
offchain OffchainClient,
ctx func() context.Context,
Expand All @@ -120,6 +121,7 @@ func NewEnvironment(
Logger: logger,
ExistingAddresses: existingAddrs,
Chains: chains,
SolChains: solChains,
NodeIDs: nodeIDs,
Offchain: offchain,
GetContext: ctx,
Expand Down Expand Up @@ -158,6 +160,17 @@ func (e Environment) AllChainSelectorsExcluding(excluding []uint64) []uint64 {
return selectors
}

func (e Environment) AllChainSelectorsSolana() []uint64 {
var selectors []uint64
for sel := range e.SolChains {
selectors = append(selectors, sel)
}
sort.Slice(selectors, func(i, j int) bool {
return selectors[i] < selectors[j]
})
return selectors
}

func (e Environment) AllDeployerKeys() []common.Address {
var deployerKeys []common.Address
for sel := range e.Chains {
Expand Down

0 comments on commit aaab52e

Please sign in to comment.