Correct magnitude in sim/example

This commit is contained in:
nolash 2021-06-07 09:07:34 +02:00
parent e47720fa04
commit 62d8820936
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
3 changed files with 2 additions and 3 deletions

View File

@ -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):

View File

@ -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)

View File

@ -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)