mirror of
git://holbrook.no/erc20-demurrage-token
synced 2024-12-22 03:57:31 +01:00
Correct magnitude in sim/example
This commit is contained in:
parent
e47720fa04
commit
62d8820936
@ -151,7 +151,7 @@ class DemurrageTokenSimulation:
|
||||
def get_demurrage(self):
|
||||
o = self.caller_contract.demurrage_amount(self.address, sender_address=self.caller_address)
|
||||
r = self.rpc.do(o)
|
||||
return float(self.caller_contract.parse_demurrage_amount(r) / (10 ** 40))
|
||||
return float(self.caller_contract.parse_demurrage_amount(r) / (10 ** 38))
|
||||
|
||||
|
||||
def from_units(self, v):
|
||||
|
@ -15,7 +15,7 @@ settings = DemurrageTokenSettings()
|
||||
settings.name = 'Simulated Demurrage Token'
|
||||
settings.symbol = 'SIM'
|
||||
settings.decimals = 6
|
||||
settings.demurrage_level = int(decay_per_minute*(10**40))
|
||||
settings.demurrage_level = int(decay_per_minute*(10**38))
|
||||
settings.period_minutes = 1 # 1 week in minutes
|
||||
chain = 'evm:foochain:42'
|
||||
cap = (10 ** 6) * (10 ** 12)
|
||||
|
@ -285,7 +285,6 @@ class TestRedistribution(TestDemurrageDefault):
|
||||
r = self.rpc.do(o)
|
||||
self.assertEqual(r['status'], 1)
|
||||
|
||||
# logg.debug('log {}'.format(r.logs))
|
||||
(tx_hash, o) = c.apply_redistribution_on_account(self.address, self.accounts[4], self.accounts[2])
|
||||
self.rpc.do(o)
|
||||
o = receipt(tx_hash)
|
||||
|
Loading…
Reference in New Issue
Block a user