From aaab52e01412ea4f1de4f748cadf0c127682418c Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Fri, 3 Jan 2025 15:18:33 +0000 Subject: [PATCH] Adding solchains in NewEnv --- deployment/environment.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/deployment/environment.go b/deployment/environment.go index bfbeac2f0c4..def161ae521 100644 --- a/deployment/environment.go +++ b/deployment/environment.go @@ -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, @@ -120,6 +121,7 @@ func NewEnvironment( Logger: logger, ExistingAddresses: existingAddrs, Chains: chains, + SolChains: solChains, NodeIDs: nodeIDs, Offchain: offchain, GetContext: ctx, @@ -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 {