Skip to content

Commit cf1f946

Browse files
committed
feat(query_group): add methods for DRep and gov action deposits
- Added `get_drep_deposit` method to retrieve DRep deposit amount. - Added `get_gov_action_deposit` method to retrieve governance action deposit amount.
1 parent 4b9eb99 commit cf1f946

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cardano_clusterlib/query_group.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,16 @@ def get_pool_deposit(self) -> int:
287287
pparams = self.get_protocol_params()
288288
return pparams.get("stakePoolDeposit") or 0
289289

290+
def get_drep_deposit(self) -> int:
291+
"""Return DRep deposit amount."""
292+
pparams = self.get_protocol_params()
293+
return pparams.get("dRepDeposit") or 0
294+
295+
def get_gov_action_deposit(self) -> int:
296+
"""Return governance action deposit amount."""
297+
pparams = self.get_protocol_params()
298+
return pparams.get("govActionDeposit") or 0
299+
290300
def get_stake_distribution(self) -> dict[str, float]:
291301
"""Return current aggregated stake distribution per stake pool."""
292302
# Stake pool values are displayed starting with line 2 of the command output

0 commit comments

Comments
 (0)