Skip to content

Commit 506a25a

Browse files
Compatible group... Include group.
1 parent 474c7ab commit 506a25a

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

cardano_clusterlib/compat_alonzo_group.py

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ class StakeAddressGroup:
3838

3939
def __init__(self, clusterlib_obj: "ClusterLib", base_args: tuple[str, str]) -> None:
4040
self._clusterlib_obj = clusterlib_obj
41-
self._group_args = (*base_args, "stake-address")
41+
self._cli_args = ("cardano-cli", *base_args, "stake-address")
4242

4343
def registration_certificate(
44-
self,
45-
cli_args: itp.UnpackableSequence,
44+
self,
45+
cli_args: itp.UnpackableSequence,
4646
) -> None:
4747
"""Wrapper for:
4848
cardano-cli compatible alonzo stake-address registration-certificate
4949
"""
5050
full_args = [
51-
*self._group_args,
51+
*self._cli_args,
5252
"registration-certificate",
5353
*cli_args,
5454
]
@@ -58,10 +58,30 @@ def registration_certificate(
5858
" ".join(str(a) for a in full_args),
5959
)
6060

61-
self._clusterlib_obj.cli(full_args)
61+
self._clusterlib_obj.cli(full_args, add_default_args=False)
62+
63+
def stake_delegation_certificate(
64+
self,
65+
cli_args: itp.UnpackableSequence,
66+
) -> None:
67+
"""Wrapper for:
68+
cardano-cli compatible alonzo stake-address stake-delegation-certificate
69+
"""
70+
full_args = [
71+
*self._cli_args,
72+
"stake-delegation-certificate",
73+
*cli_args,
74+
]
75+
76+
LOGGER.debug(
77+
"Running compatible alonzo stake-address stake-delegation-certificate: %s",
78+
" ".join(str(a) for a in full_args),
79+
)
80+
81+
self._clusterlib_obj.cli(full_args, add_default_args=False)
6282

6383
def __repr__(self) -> str:
64-
return f"<StakeAddressGroup base={self._group_args}>"
84+
return f"<{self.__class__.__name__} cli_args={self._cli_args}>"
6585

6686

6787
class StakePoolGroup:

0 commit comments

Comments
 (0)