Exemplo n.º 1
0
 def nays(self):
     return Tributes(self.quorum - self.yays)
Exemplo n.º 2
0
 def __post_init__(self):
     self.tally = Tributes(self.tally)
     self.quorum = Tributes(self.quorum)
     self.fee = Tributes(self.fee)
Exemplo n.º 3
0
 def yays(self):
     return Tributes((self.quorum + self.tally) // 2)
Exemplo n.º 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'))
Exemplo n.º 5
0
 def total_supply(self) -> Tributes:
     """
     Total supply of tributes. New tributes are printed every block.
     """
     return Tributes(self.call.totalSupply())
Exemplo n.º 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))
Exemplo n.º 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))
Exemplo n.º 8
0
 def balance_of(self, address) -> Tributes:
     """
     Returns:
         Tribute balance of address in wei.
     """
     return Tributes(self.call.balanceOf(address))