mirror of
git://holbrook.no/erc20-demurrage-token
synced 2024-11-21 15:56:46 +01:00
Fix bogus demurrage calculation in publish script
This commit is contained in:
parent
fab1b2d4b8
commit
cf1e716b5a
@ -68,10 +68,11 @@ def process_config_local(config, arg, args, flags):
|
||||
config.add(sink_address, 'TOKEN_SINK_ADDRESS')
|
||||
config.add(args.redistribution_period, 'TOKEN_REDISTRIBUTION_PERIOD')
|
||||
|
||||
v = args.demurrage_level / 1000000
|
||||
v = (1 - (args.demurrage_level / 1000000)) ** (1 / config.get('TOKEN_REDISTRIBUTION_PERIOD'))
|
||||
if v >= 1.0:
|
||||
raise ValueError('demurrage level must be less than 100%')
|
||||
demurrage_level = to_fixed(v)
|
||||
logg.info('v {} demurrage level {}'.format(v, demurrage_level))
|
||||
config.add(demurrage_level, 'TOKEN_DEMURRAGE_LEVEL')
|
||||
return config
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = erc20-demurrage-token
|
||||
version = 0.3.3
|
||||
version = 0.3.4
|
||||
description = ERC20 token with redistributed continual demurrage
|
||||
author = Louis Holbrook
|
||||
author_email = dev@holbrook.no
|
||||
|
Loading…
Reference in New Issue
Block a user