@@ -28,9 +28,13 @@ import (
2828 cldlogger "github.com/smartcontractkit/chainlink/deployment/logger"
2929
3030 "github.com/smartcontractkit/chainlink/system-tests/lib/cre/capabilities/sets"
31+ "github.com/smartcontractkit/chainlink/system-tests/lib/cre/environment/blockchains"
32+ "github.com/smartcontractkit/chainlink/system-tests/lib/cre/environment/blockchains/evm"
33+ blockchains_sets "github.com/smartcontractkit/chainlink/system-tests/lib/cre/environment/blockchains/sets"
3134 envconfig "github.com/smartcontractkit/chainlink/system-tests/lib/cre/environment/config"
3235 "github.com/smartcontractkit/chainlink/system-tests/lib/cre/environment/stagegen"
3336 "github.com/smartcontractkit/chainlink/system-tests/lib/cre/flags"
37+ "github.com/smartcontractkit/chainlink/system-tests/lib/infra"
3438
3539 keystone_changeset "github.com/smartcontractkit/chainlink/deployment/keystone/changeset"
3640 libc "github.com/smartcontractkit/chainlink/system-tests/lib/conversions"
@@ -42,7 +46,6 @@ import (
4246 libformat "github.com/smartcontractkit/chainlink/system-tests/lib/format"
4347
4448 "github.com/smartcontractkit/chainlink-testing-framework/framework"
45- "github.com/smartcontractkit/chainlink-testing-framework/framework/components/blockchain"
4649 billingplatformservice "github.com/smartcontractkit/chainlink-testing-framework/framework/components/dockercompose/billing_platform_service"
4750 chipingressset "github.com/smartcontractkit/chainlink-testing-framework/framework/components/dockercompose/chip_ingress_set"
4851 "github.com/smartcontractkit/chainlink-testing-framework/framework/tracking"
@@ -179,18 +182,23 @@ var StartCmdRecoverHandlerFunc = func(p any, cleanupWait time.Duration) {
179182 }
180183}
181184
182- var StartCmdGenerateSettingsFile = func (homeChainOut * cre. WrappedBlockchainOutput , output * creenv.SetupOutput ) error {
185+ var StartCmdGenerateSettingsFile = func (registryChain blockchains. Blockchain , output * creenv.SetupOutput ) error {
183186 rpcs := map [uint64 ]string {}
184- for _ , bcOut := range output .BlockchainOutput {
185- rpcs [bcOut .ChainSelector ] = bcOut .BlockchainOutput .Nodes [0 ].ExternalHTTPUrl
187+ for _ , bcOut := range output .Blockchains {
188+ rpcs [bcOut .ChainSelector ()] = bcOut .CtfOutput ().Nodes [0 ].ExternalHTTPUrl
189+ }
190+
191+ regChainEVM , isEVM := registryChain .(* evm.Blockchain )
192+ if ! isEVM {
193+ return fmt .Errorf ("registry chain is not EVM, but %T, cannot generate CRE CLI settings file" , registryChain )
186194 }
187195
188196 creCLISettingsFile , settingsErr := crecli .PrepareCRECLISettingsFile (
189197 crecli .CRECLIProfile ,
190- homeChainOut .SethClient .MustGetRootKeyAddress (),
198+ regChainEVM .SethClient .MustGetRootKeyAddress (),
191199 output .CldEnvironment .ExistingAddresses , //nolint:staticcheck,nolintlint // SA1019: deprecated but we don't want to migrate now
192200 output .DonTopology .WorkflowDonID ,
193- homeChainOut .ChainSelector ,
201+ regChainEVM .ChainSelector () ,
194202 rpcs ,
195203 output .S3ProviderOutput ,
196204 )
@@ -266,10 +274,6 @@ func startCmd() *cobra.Command {
266274 return errors .Wrap (err , "failed to set default CTF configs" )
267275 }
268276
269- if pkErr := creenv .SetDefaultPrivateKeyIfEmpty (blockchain .DefaultAnvilPrivateKey ); pkErr != nil {
270- return errors .Wrap (pkErr , "failed to set default private key" )
271- }
272-
273277 cleanUpErr := envconfig .RemoveAllEnvironmentStateDir (relativePathToRepoRoot )
274278 if cleanUpErr != nil {
275279 return errors .Wrap (cleanUpErr , "failed to clean up environment state files" )
@@ -352,7 +356,7 @@ func startCmd() *cobra.Command {
352356 return errors .Wrap (startErr , "failed to start environment" )
353357 }
354358
355- homeChainOut := output .BlockchainOutput [0 ]
359+ homeChainOut := output .Blockchains [0 ]
356360
357361 sErr := StartCmdGenerateSettingsFile (homeChainOut , output )
358362 if sErr != nil {
@@ -446,7 +450,7 @@ func startCmd() *cobra.Command {
446450
447451 wfRegAddr := libcontracts .MustFindAddressesForChain (
448452 output .CldEnvironment .ExistingAddresses , //nolint:staticcheck,nolintlint // SA1019: deprecated but we don't want to migrate now
449- output .BlockchainOutput [0 ].ChainSelector ,
453+ output .Blockchains [0 ].ChainSelector () ,
450454 keystone_changeset .WorkflowRegistry .String ())
451455
452456 var workflowDonID uint32
@@ -461,7 +465,7 @@ func startCmd() *cobra.Command {
461465 return errors .New ("no workflow DON found" )
462466 }
463467
464- deployErr := deployAndVerifyExampleWorkflow (cmdContext , homeChainOut .BlockchainOutput .Nodes [0 ].ExternalHTTPUrl , gatewayURL , output .DonTopology .GatewayConnectorOutput .Configurations [0 ].Dons [0 ].ID , workflowDonID , exampleWorkflowTimeout , exampleWorkflowTrigger , wfRegAddr .Hex ())
468+ deployErr := deployAndVerifyExampleWorkflow (cmdContext , homeChainOut .CtfOutput () .Nodes [0 ].ExternalHTTPUrl , gatewayURL , output .DonTopology .GatewayConnectorOutput .Configurations [0 ].Dons [0 ].ID , workflowDonID , exampleWorkflowTimeout , exampleWorkflowTrigger , wfRegAddr .Hex ())
465469 if deployErr != nil {
466470 fmt .Printf ("Failed to deploy and verify example workflow: %s\n " , deployErr )
467471 }
@@ -692,6 +696,9 @@ func StartCLIEnvironment(
692696 in .JD .CSAEncryptionKey = hex .EncodeToString (crypto .FromECDSA (key )[:32 ])
693697 fmt .Printf ("Generated new CSA encryption key for JD: %s\n " , in .JD .CSAEncryptionKey )
694698 }
699+
700+ singleFileLogger := cldlogger .NewSingleFileLogger (nil )
701+
695702 universalSetupInput := & creenv.SetupInput {
696703 CapabilitiesAwareNodeSets : in .NodeSets ,
697704 BlockchainsInput : in .Blockchains ,
@@ -705,11 +712,12 @@ func StartCLIEnvironment(
705712 Capabilities : capabilities ,
706713 JobSpecFactoryFunctions : extraJobSpecFunctions ,
707714 StageGen : initLocalCREStageGen (in ),
715+ BlockchainDeployers : blockchains_sets .NewDeployerSet (testLogger , in .Infra , infra .CribConfigsDir ),
708716 }
709717
710718 ctx , cancel := context .WithTimeout (cmdContext , 10 * time .Minute )
711719 defer cancel ()
712- universalSetupOutput , setupErr := creenv .SetupTestEnvironment (ctx , testLogger , cldlogger . NewSingleFileLogger ( nil ) , universalSetupInput , relativePathToRepoRoot )
720+ universalSetupOutput , setupErr := creenv .SetupTestEnvironment (ctx , testLogger , singleFileLogger , universalSetupInput , relativePathToRepoRoot )
713721 if setupErr != nil {
714722 return nil , fmt .Errorf ("failed to setup test environment: %w" , setupErr )
715723 }
0 commit comments