コード例 #1
0
ファイル: chaotic.py プロジェクト: zaxayn/nucypher
 def start_distribution(self, now: bool = True) -> bool:
     """Start token distribution"""
     self.log.info(NU_BANNER)
     self.log.info("Starting NU Token Distribution | START")
     if self.token_balance == NU.ZERO():
         raise self.ActorError(f"Felix address {self.checksum_address} has 0 NU tokens.")
     self._distribution_task.start(interval=self.DISTRIBUTION_INTERVAL, now=now)
     return True
コード例 #2
0
ファイル: actors.py プロジェクト: pranav-singhal/nucypher
 def current_stake(self) -> NU:
     """
     The total number of staked tokens, either locked or unlocked in the current period.
     """
     if self.stakes:
         return NU(sum(int(stake.value) for stake in self.stakes), 'NuNit')
     else:
         return NU.ZERO()
コード例 #3
0
ファイル: actors.py プロジェクト: debug510/nucypher
 def is_staking(self) -> bool:
     """Checks if this Miner currently has active stakes / locked tokens."""
     return bool(self.locked_tokens > NU.ZERO())