From 4d62bdfa34c05a2cb5e5f68129a5c6d12be8ecfe Mon Sep 17 00:00:00 2001 From: Bolek Kulbabinski <1416262+bolekk@users.noreply.github.com> Date: Tue, 26 Nov 2024 05:58:13 -0800 Subject: [PATCH] [Deployments] Add Flags to the Environment struct Add an ability to pass any set of command line flags throughout the executions. Example flag: --dry-run. --- deployment/environment.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deployment/environment.go b/deployment/environment.go index c55f4d3efe6..31abb83a440 100644 --- a/deployment/environment.go +++ b/deployment/environment.go @@ -76,6 +76,7 @@ type Environment struct { Chains map[uint64]Chain NodeIDs []string Offchain OffchainClient + Flags map[string]string } func NewEnvironment( @@ -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