Skip to content

Commit

Permalink
[Deployments] Add Flags to the Environment struct
Browse files Browse the repository at this point in the history
Add an ability to pass any set of command line flags throughout the executions.
Example flag: --dry-run.
  • Loading branch information
bolekk committed Nov 26, 2024
1 parent b79da55 commit 4d62bdf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deployment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ type Environment struct {
Chains map[uint64]Chain
NodeIDs []string
Offchain OffchainClient
Flags map[string]string
}

func NewEnvironment(
Expand Down Expand Up @@ -135,6 +136,10 @@ func (e Environment) AllDeployerKeys() []common.Address {
return deployerKeys
}

func (e Environment) SetFlag(key, value string) {
e.Flags[key] = value
}

func ConfirmIfNoError(chain Chain, tx *types.Transaction, err error) (uint64, error) {
if err != nil {
//revive:disable
Expand Down

0 comments on commit 4d62bdf

Please sign in to comment.