Exemple #1
0
 def nays(self):
     return Tributes(self.quorum - self.yays)
Exemple #2
0
 def __post_init__(self):
     self.tally = Tributes(self.tally)
     self.quorum = Tributes(self.quorum)
     self.fee = Tributes(self.fee)
Exemple #3
0
 def yays(self):
     return Tributes((self.quorum + self.tally) // 2)
Exemple #4
0
 def dispute_fee(self) -> Tributes:
     """
     Deposit a reporter must put to open a dispute.
     If they lose the case, this deposit is forfeited and is given to the miner.
     """
     return Tributes(self._uint_var('disputeFee'))
Exemple #5
0
 def total_supply(self) -> Tributes:
     """
     Total supply of tributes. New tributes are printed every block.
     """
     return Tributes(self.call.totalSupply())
Exemple #6
0
 def allowance(self, address, spender) -> Tributes:
     """
     Returns:
         How many tributes spender is allowed to spend on behalf of address.
     """
     return Tributes(self.call.allowance(address, spender))
Exemple #7
0
 def balance_of_at(self, address, block_number) -> Tributes:
     """
     Returns:
         Tribute balance snapshot of address in wei.
     """
     return Tributes(self.call.balanceOfAt(address, block_number))
Exemple #8
0
 def balance_of(self, address) -> Tributes:
     """
     Returns:
         Tribute balance of address in wei.
     """
     return Tributes(self.call.balanceOf(address))