erc20-demurrage-token

ERC20 token with redistributed continual demurrage
Log | Files | Refs | README

commit 62d8820936a433977ae5765f4eead026bfc144c2
parent e47720fa04c2ca6abc2e3329981fc6f2cd20e529
Author: nolash <dev@holbrook.no>
Date:   Mon,  7 Jun 2021 09:07:34 +0200

Correct magnitude in sim/example

Diffstat:
Mpython/erc20_demurrage_token/sim/sim.py | 2+-
Mpython/examples/sim_noredistribute.py | 2+-
Mpython/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 @@ -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 @@ -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 @@ -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)