Documentation
¶
Index ¶
- Constants
- func Load(getCtx func() context.Context, lggr logger.Logger, env string, ...) (cldf.Environment, error)
- type LoadEnvironmentOption
- func OnlyLoadChainsFor(migrationKey string, chainsSelectors []uint64) LoadEnvironmentOption
- func WithAnvilKeyAsDeployer() LoadEnvironmentOption
- func WithOperationRegistry(registry *operations.OperationRegistry) LoadEnvironmentOption
- func WithReporter(reporter operations.Reporter) LoadEnvironmentOption
- func WithoutJD() LoadEnvironmentOption
- type LoadEnvironmentOptions
Constants ¶
const ( Local = "local" StagingTestnet = "staging_testnet" StagingMainnet = "staging_mainnet" Staging = "staging" // Note this is currently the equivalent of staging_testnet. ProdMainnet = "prod_mainnet" ProdTestnet = "prod_testnet" Prod = "prod" // Legacy environments to be cleaned up once the migration to the above environments is completed. Testnet = "testnet" Mainnet = "mainnet" SolStaging = "solana-staging" // Note this is testnet staging for Solana. )
Variables ¶
This section is empty.
Functions ¶
func Load ¶ added in v0.40.0
func Load( getCtx func() context.Context, lggr logger.Logger, env string, domain cldf_domain.Domain, useRealBackends bool, opts ...LoadEnvironmentOption, ) (cldf.Environment, error)
Types ¶
type LoadEnvironmentOption ¶ added in v0.40.0
type LoadEnvironmentOption func(*LoadEnvironmentOptions)
LoadEnvironmentOption is a function that modifies LoadEnvironmentOptions.
func OnlyLoadChainsFor ¶ added in v0.40.0
func OnlyLoadChainsFor(migrationKey string, chainsSelectors []uint64) LoadEnvironmentOption
OnlyLoadChainsFor will configure the environment to load only the specified chains for the given migration key. By default, if option is not specified, all chains are loaded. This is useful for migrations that are only applicable to a subset of chains.
func WithAnvilKeyAsDeployer ¶ added in v0.40.0
func WithAnvilKeyAsDeployer() LoadEnvironmentOption
WithAnvilKeyAsDeployer sets the private key of the forked environment to use the Anvil key as the deployer key.
func WithOperationRegistry ¶ added in v0.40.0
func WithOperationRegistry(registry *operations.OperationRegistry) LoadEnvironmentOption
WithOperationRegistry will configure the bundle in environment to use the specified operation registry.
func WithReporter ¶ added in v0.40.0
func WithReporter(reporter operations.Reporter) LoadEnvironmentOption
WithReporter sets the reporter for LoadEnvironment.
func WithoutJD ¶ added in v0.40.0
func WithoutJD() LoadEnvironmentOption
WithoutJD will configure the environment to not load Job Distributor. By default, if option is not specified, Job Distributor is loaded. This is useful for migrations that do not require Job Distributor to be loaded. WARNING: This will set env.Offchain to nil. Ensure that you do not use env.Offchain.
type LoadEnvironmentOptions ¶ added in v0.40.0
type LoadEnvironmentOptions struct {
// contains filtered or unexported fields
}
LoadEnvironmentOptions contains configuration options for LoadEnvironment.