def get_cluster_obj(self) -> clusterlib.ClusterLib:
     """Return instance of `ClusterLib` (cluster_obj)."""
     cluster_env = get_cluster_env()
     slots_offset = self._get_slots_offset(cluster_env.state_dir)
     cluster_obj = clusterlib.ClusterLib(
         state_dir=cluster_env.state_dir,
         protocol=clusterlib.Protocols.CARDANO,
         era=cluster_env.cluster_era,
         tx_era=cluster_env.tx_era,
         slots_offset=slots_offset,
     )
     return cluster_obj
Example #2
0
 def get_cluster_obj(self) -> clusterlib.ClusterLib:
     """Return instance of `ClusterLib` (cluster_obj)."""
     cluster_env = get_cluster_env()
     slots_offset = self._get_slots_offset(cluster_env.state_dir)
     cluster_obj = clusterlib.ClusterLib(
         state_dir=cluster_env.state_dir,
         protocol=clusterlib.Protocols.CARDANO,
         tx_era=cluster_env.tx_era,
         slots_offset=slots_offset,
     )
     cluster_obj.overwrite_outfiles = not (
         configuration.DONT_OVERWRITE_OUTFILES)
     return cluster_obj
Example #3
0
 def get_cluster_obj(
     self, protocol: str = "", tx_era: str = "", slots_offset: int = 0
 ) -> clusterlib.ClusterLib:
     """Return instance of `ClusterLib` (cluster_obj)."""
     cluster_env = get_cluster_env()
     cluster_obj = clusterlib.ClusterLib(
         state_dir=cluster_env.state_dir,
         protocol=protocol or clusterlib.Protocols.CARDANO,
         tx_era=tx_era or cluster_env.tx_era,
         slots_offset=slots_offset or self._get_slots_offset(cluster_env.state_dir),
     )
     cluster_obj.overwrite_outfiles = not (configuration.DONT_OVERWRITE_OUTFILES)
     cluster_obj._min_change_value = 2000_000  # TODO: hardcoded `minUTxOValue`
     # TODO: remove once `--cddl-format` is deprecated
     cluster_obj.use_cddl = configuration.USE_CDDL
     return cluster_obj