Skip to content

Commit

Permalink
remove all the old crap
Browse files Browse the repository at this point in the history
  • Loading branch information
badgersrus committed Jan 13, 2025
1 parent f349a01 commit 6c1ef2a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
12 changes: 6 additions & 6 deletions testnet/launcher/l1contractdeployer/cmd/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (

// L1ContractDeployerConfigCLI represents the configurations passed into the deployer over CLI
type L1ContractDeployerConfigCLI struct {
l1HTTPURL string
privateKey string
dockerImage string
challengePeriod int
l1HTTPURL string
privateKey string
dockerImage string
//challengePeriod int
contractsEnvFile string
}

Expand All @@ -22,13 +22,13 @@ func ParseConfigCLI() *L1ContractDeployerConfigCLI {
privateKey := flag.String(privateKeyFlag, "", flagUsageMap[privateKeyFlag])
dockerImage := flag.String(dockerImageFlag, "testnetobscuronet.azurecr.io/obscuronet/hardhatdeployer:latest", flagUsageMap[dockerImageFlag])
contractsEnvFile := flag.String(contractsEnvFileFlag, "", flagUsageMap[contractsEnvFileFlag])
challengePeriod := flag.Int(challengePeriodFlag, 0, flagUsageMap[challengePeriodFlag])
//challengePeriod := flag.Int(challengePeriodFlag, 0, flagUsageMap[challengePeriodFlag])
flag.Parse()

cfg.l1HTTPURL = *l1HTTPURL
cfg.privateKey = *privateKey
cfg.dockerImage = *dockerImage
cfg.challengePeriod = *challengePeriod
//cfg.challengePeriod = *challengePeriod
cfg.contractsEnvFile = *contractsEnvFile

return cfg
Expand Down
4 changes: 2 additions & 2 deletions testnet/launcher/l1contractdeployer/cmd/cli_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const (
privateKeyFlag = "private_key"
dockerImageFlag = "docker_image"
contractsEnvFileFlag = "contracts_env_file"
challengePeriodFlag = "l1_challenge_period"
//challengePeriodFlag = "l1_challenge_period"
)

// Returns a map of the flag usages.
Expand All @@ -17,6 +17,6 @@ func getFlagUsageMap() map[string]string {
privateKeyFlag: "L1 and L2 private key used in the node",
dockerImageFlag: "Docker image to run",
contractsEnvFileFlag: "If set, it will write the contract addresses to the file",
challengePeriodFlag: "L1 delay when adding message bus root",
//challengePeriodFlag: "L1 delay when adding message bus root",
}
}
2 changes: 1 addition & 1 deletion testnet/launcher/l1contractdeployer/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func main() {
l1cd.WithL1HTTPURL(cliConfig.l1HTTPURL), // "http://eth2network:8025"
l1cd.WithPrivateKey(cliConfig.privateKey), //"f52e5418e349dccdda29b6ac8b0abe6576bb7713886aa85abea6181ba731f9bb"),
l1cd.WithDockerImage(cliConfig.dockerImage), //"testnetobscuronet.azurecr.io/obscuronet/hardhatdeployer:latest"
l1cd.WithChallengePeriod(cliConfig.challengePeriod),
//l1cd.WithChallengePeriod(cliConfig.challengePeriod),
),
)
if err != nil {
Expand Down
20 changes: 10 additions & 10 deletions testnet/launcher/l1contractdeployer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ type Option = func(c *Config)

// Config holds the properties that configure the package
type Config struct {
l1HTTPURL string
privateKey string
dockerImage string
challengePeriod int
debugEnabled bool
l1HTTPURL string
privateKey string
dockerImage string
//challengePeriod int
debugEnabled bool
}

func NewContractDeployerConfig(opts ...Option) *Config {
Expand Down Expand Up @@ -40,11 +40,11 @@ func WithDockerImage(s string) Option {
}
}

func WithChallengePeriod(i int) Option {
return func(c *Config) {
c.challengePeriod = i
}
}
//func WithChallengePeriod(i int) Option {
// return func(c *Config) {
// c.challengePeriod = i
// }
//}

func WithDebugEnabled(b bool) Option {
return func(c *Config) {
Expand Down

0 comments on commit 6c1ef2a

Please sign in to comment.