From 62d8820936a433977ae5765f4eead026bfc144c2 Mon Sep 17 00:00:00 2001 From: nolash Date: Mon, 7 Jun 2021 09:07:34 +0200 Subject: [PATCH] Correct magnitude in sim/example --- python/erc20_demurrage_token/sim/sim.py | 2 +- python/examples/sim_noredistribute.py | 2 +- python/tests/test_redistribution.py | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/python/erc20_demurrage_token/sim/sim.py b/python/erc20_demurrage_token/sim/sim.py index e10f583..103d2f1 100644 --- a/python/erc20_demurrage_token/sim/sim.py +++ b/python/erc20_demurrage_token/sim/sim.py @@ -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): diff --git a/python/examples/sim_noredistribute.py b/python/examples/sim_noredistribute.py index cd06a51..fa9833a 100644 --- a/python/examples/sim_noredistribute.py +++ b/python/examples/sim_noredistribute.py @@ -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) diff --git a/python/tests/test_redistribution.py b/python/tests/test_redistribution.py index e1ad006..af4e77f 100644 --- a/python/tests/test_redistribution.py +++ b/python/tests/test_redistribution.py @@ -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)