mirror of
git://holbrook.no/erc20-demurrage-token
synced 2026-05-14 08:38:44 +02:00
Add comments, remove dead code, remove make install for dead contracts
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
- 0.1.2
|
||||
* Add token burn function
|
||||
* Fix gas leak when calculating decay on period change
|
||||
* Remove all but SingleNocap contract in make install
|
||||
- 0.1.1
|
||||
* Settable demurrage steps for apply demurrage cli tool
|
||||
- 0.1.0
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -95,13 +95,6 @@ class TestDemurrage(EthTesterCase):
|
||||
|
||||
def setUp(self):
|
||||
super(TestDemurrage, self).setUp()
|
||||
# token_deploy = TestTokenDeploy()
|
||||
# self.settings = token_deploy.settings
|
||||
# self.sink_address = token_deploy.sink_address
|
||||
# self.start_block = token_deploy.start_block
|
||||
# self.start_time = token_deploy.start_time
|
||||
# self.default_supply = self.default_supply
|
||||
# self.default_supply_cap = self.default_supply_cap
|
||||
period = PERIOD
|
||||
try:
|
||||
period = getattr(self, 'period')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = erc20-demurrage-token
|
||||
version = 0.1.1
|
||||
version = 0.1.2
|
||||
description = ERC20 token with redistributed continual demurrage
|
||||
author = Louis Holbrook
|
||||
author_email = dev@holbrook.no
|
||||
|
||||
@@ -33,7 +33,6 @@ class TestBurn(TestDemurrage):
|
||||
super(TestBurn, self).setUp()
|
||||
|
||||
|
||||
# tax_level = ppm
|
||||
def deploy(self, tax_level=None):
|
||||
nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
|
||||
c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
|
||||
@@ -51,7 +50,8 @@ class TestBurn(TestDemurrage):
|
||||
|
||||
logg.info('deployed with mode {}'.format(self.mode))
|
||||
|
||||
|
||||
|
||||
# Burn tokens and immediately check balances and supply
|
||||
def test_burn_basic(self):
|
||||
self.deploy()
|
||||
nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
|
||||
@@ -92,6 +92,7 @@ class TestBurn(TestDemurrage):
|
||||
self.assertEqual(burned, 600000)
|
||||
|
||||
|
||||
# burn tokens and check sink balance and supply after first redistribution period
|
||||
def test_burned_redistribution(self):
|
||||
self.deploy()
|
||||
nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
|
||||
@@ -149,7 +150,7 @@ class TestBurn(TestDemurrage):
|
||||
self.assert_within_lower(bal, 500000000, 0.0025)
|
||||
|
||||
|
||||
|
||||
# burn tokens and check sink and taxed balance and supply after first redistribution period
|
||||
def test_burned_other_redistribution(self):
|
||||
self.deploy()
|
||||
nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
|
||||
@@ -218,6 +219,7 @@ class TestBurn(TestDemurrage):
|
||||
self.assert_within_lower(sink_bal, bal, 0.09) # TODO is this ok variance, 1.0 is ppm?
|
||||
|
||||
|
||||
# verify expected results of balance and supply after multiple redistribution periods
|
||||
def test_burn_accumulate(self):
|
||||
self.deploy(tax_level=2/1000)
|
||||
nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
|
||||
|
||||
@@ -40,6 +40,7 @@ class TestDemurragePeriods(TestDemurrage):
|
||||
logg.info('deployed with mode {}'.format(self.mode))
|
||||
|
||||
|
||||
# verify that tax level calculation is in ppm as expected
|
||||
def test_ppm(self):
|
||||
nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
|
||||
c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
|
||||
@@ -72,6 +73,7 @@ class TestDemurragePeriods(TestDemurrage):
|
||||
|
||||
|
||||
|
||||
# verify balances and supply after multiple demurrage periods
|
||||
def test_over_time(self):
|
||||
nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
|
||||
c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
|
||||
|
||||
Reference in New Issue
Block a user