mirror of
git://holbrook.no/erc20-demurrage-token
synced 2024-11-22 08:16:47 +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(sink_address, 'TOKEN_SINK_ADDRESS')
|
||||||
config.add(args.redistribution_period, 'TOKEN_REDISTRIBUTION_PERIOD')
|
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:
|
if v >= 1.0:
|
||||||
raise ValueError('demurrage level must be less than 100%')
|
raise ValueError('demurrage level must be less than 100%')
|
||||||
demurrage_level = to_fixed(v)
|
demurrage_level = to_fixed(v)
|
||||||
|
logg.info('v {} demurrage level {}'.format(v, demurrage_level))
|
||||||
config.add(demurrage_level, 'TOKEN_DEMURRAGE_LEVEL')
|
config.add(demurrage_level, 'TOKEN_DEMURRAGE_LEVEL')
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = erc20-demurrage-token
|
name = erc20-demurrage-token
|
||||||
version = 0.3.3
|
version = 0.3.4
|
||||||
description = ERC20 token with redistributed continual demurrage
|
description = ERC20 token with redistributed continual demurrage
|
||||||
author = Louis Holbrook
|
author = Louis Holbrook
|
||||||
author_email = dev@holbrook.no
|
author_email = dev@holbrook.no
|
||||||
|
Loading…
Reference in New Issue
Block a user