Skip to content

Commit 50f3957

Browse files
committed
Update deploy and precompute options
Note the renamed options: | old | new | | ---------------------- | --------------- | | --custom-singleton | --singleton | | --custom-proxy-factory | --proxy-factory | Also, expand/reword help text for clarity and consistency.
1 parent 3812099 commit 50f3957

File tree

3 files changed

+20
-22
lines changed

3 files changed

+20
-22
lines changed

src/simple_safe/params.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,17 +287,17 @@ def decorator(f: FC) -> FC:
287287
"--without-events",
288288
is_flag=True,
289289
default=False,
290-
help="use implementation that does not emit events",
290+
help="deploy an implementation that does not emit events",
291291
),
292292
optgroup.option(
293-
"--custom-singleton",
293+
"--singleton",
294294
metavar="ADDRESS",
295-
help=f"use a non-canonical Singleton {DEPLOY_SAFE_VERSION}",
295+
help=f"configure a non-canonical Singleton {DEPLOY_SAFE_VERSION}",
296296
),
297297
optgroup.option(
298-
"--custom-proxy-factory",
298+
"--proxy-factory",
299299
metavar="ADDRESS",
300-
help=f"use a non-canonical SafeProxyFactory {DEPLOY_SAFE_VERSION}",
300+
help=f"deploy with a non-canonical SafeProxyFactory {DEPLOY_SAFE_VERSION}",
301301
),
302302
optgroup.group(
303303
"Initialization settings",
@@ -320,7 +320,7 @@ def decorator(f: FC) -> FC:
320320
optgroup.option(
321321
"--fallback",
322322
metavar="ADDRESS",
323-
help="custom Fallback Handler address",
323+
help="set a custom Fallback Handler [default: CompatibilityFallbackHandler]",
324324
),
325325
]
326326
):

src/simple_safe/safe.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -881,8 +881,8 @@ def build_safe_call(
881881
def deploy(
882882
chain_id: Optional[int],
883883
chain_specific: bool,
884-
custom_proxy_factory: Optional[str],
885-
custom_singleton: Optional[str],
884+
proxy_factory: Optional[str],
885+
singleton: Optional[str],
886886
fallback: Optional[str],
887887
force: bool,
888888
gas_limit: Optional[int],
@@ -929,8 +929,8 @@ def deploy(
929929
data = validate_deploy_options(
930930
chain_id=chain_id if chain_specific else None,
931931
chain_specific=chain_specific,
932-
custom_proxy_factory=custom_proxy_factory,
933-
custom_singleton=custom_singleton,
932+
proxy_factory=proxy_factory,
933+
singleton=singleton,
934934
fallback=fallback,
935935
owners=owners,
936936
salt_nonce=salt_nonce,
@@ -1263,8 +1263,8 @@ def inspect(address: str, rpc: str):
12631263
def precompute(
12641264
chain_id: Optional[int],
12651265
chain_specific: bool,
1266-
custom_proxy_factory: Optional[str],
1267-
custom_singleton: Optional[str],
1266+
proxy_factory: Optional[str],
1267+
singleton: Optional[str],
12681268
fallback: Optional[str],
12691269
output: Optional[typing.TextIO],
12701270
owners: list[str],
@@ -1279,8 +1279,8 @@ def precompute(
12791279
data = validate_deploy_options(
12801280
chain_id=chain_id,
12811281
chain_specific=chain_specific,
1282-
custom_proxy_factory=custom_proxy_factory,
1283-
custom_singleton=custom_singleton,
1282+
proxy_factory=proxy_factory,
1283+
singleton=singleton,
12841284
fallback=fallback,
12851285
owners=owners,
12861286
salt_nonce=salt_nonce,

src/simple_safe/validation.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,20 @@ def validate_deploy_options(
100100
*,
101101
chain_id: Optional[int],
102102
chain_specific: bool,
103-
custom_proxy_factory: Optional[str],
104-
custom_singleton: Optional[str],
103+
proxy_factory: Optional[str],
104+
singleton: Optional[str],
105105
fallback: Optional[str],
106106
owners: list[str],
107107
salt_nonce: str,
108108
threshold: int,
109109
without_events: bool,
110110
) -> DeployParams:
111-
if custom_singleton is not None:
111+
if singleton is not None:
112112
if without_events:
113113
raise click.ClickException(
114-
"Option --without-events incompatible with --custom-singleton. "
114+
"Option --without-events incompatible with custom --singleton. "
115115
)
116-
singleton_address = custom_singleton
116+
singleton_address = singleton
117117
variant = SafeVariant.UNKNOWN
118118
elif without_events:
119119
singleton_address = DEFAULT_SAFE_SINGLETON_ADDRESS
@@ -136,9 +136,7 @@ def validate_deploy_options(
136136
chain_id = None
137137
return DeployParams(
138138
proxy_factory=to_checksum_address(
139-
DEFAULT_PROXYFACTORY_ADDRESS
140-
if custom_proxy_factory is None
141-
else custom_proxy_factory
139+
DEFAULT_PROXYFACTORY_ADDRESS if proxy_factory is None else proxy_factory
142140
),
143141
singleton=to_checksum_address(singleton_address),
144142
chain_id=chain_id,

0 commit comments

Comments
 (0)