mirror of
git://holbrook.no/erc20-demurrage-token
synced 2024-12-22 03:57:31 +01:00
Remove growby method
This commit is contained in:
parent
9d7b87be9c
commit
00f4ddba68
@ -28,23 +28,23 @@ testdir = os.path.dirname(__file__)
|
||||
|
||||
class TestGrowth(TestDemurrageDefault):
|
||||
|
||||
def test_grow_by(self):
|
||||
nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
|
||||
c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
|
||||
|
||||
growth_factor = (1000000 + self.tax_level) / 1000000
|
||||
v = 1000000000
|
||||
o = c.grow_by(self.address, v, 1, sender_address=self.accounts[0])
|
||||
r = self.rpc.do(o)
|
||||
g = c.parse_grow_by(r)
|
||||
self.assertEqual(int(v * growth_factor), g)
|
||||
|
||||
period = 10
|
||||
growth_factor = (1 + (self.tax_level) / 1000000) ** period
|
||||
o = c.grow_by(self.address, v, period, sender_address=self.accounts[0])
|
||||
r = self.rpc.do(o)
|
||||
g = c.parse_grow_by(r)
|
||||
self.assertEqual(int(v * growth_factor), g)
|
||||
# def test_grow_by(self):
|
||||
# nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
|
||||
# c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
|
||||
#
|
||||
# growth_factor = (1000000 + self.tax_level) / 1000000
|
||||
# v = 1000000000
|
||||
# o = c.grow_by(self.address, v, 1, sender_address=self.accounts[0])
|
||||
# r = self.rpc.do(o)
|
||||
# g = c.parse_grow_by(r)
|
||||
# self.assertEqual(int(v * growth_factor), g)
|
||||
#
|
||||
# period = 10
|
||||
# growth_factor = (1 + (self.tax_level) / 1000000) ** period
|
||||
# o = c.grow_by(self.address, v, period, sender_address=self.accounts[0])
|
||||
# r = self.rpc.do(o)
|
||||
# g = c.parse_grow_by(r)
|
||||
# self.assertEqual(int(v * growth_factor), g)
|
||||
|
||||
|
||||
def test_decay_by(self):
|
||||
|
@ -32,11 +32,15 @@ test: all
|
||||
python ../python/tests/test_redistribution.py
|
||||
python ../python/tests/test_pure.py
|
||||
|
||||
install: all
|
||||
#install: all
|
||||
install: single_nocap
|
||||
#cp -v DemurrageToken*.{json,bin} ../python/erc20_demurrage_token/data/
|
||||
cp -v DemurrageTokenSingleNocap.{json,bin} ../python/erc20_demurrage_token/data/
|
||||
cp -v DemurrageTokenSingleNocap.json ../python/erc20_demurrage_token/data/
|
||||
cp -v DemurrageTokenSingleNocap.bin ../python/erc20_demurrage_token/data/
|
||||
|
||||
install-broken: all
|
||||
cp -v DemurrageToken*.{json,bin} ../python/erc20_demurrage_token/data/
|
||||
|
||||
|
||||
|
||||
.PHONY: test install
|
||||
|
Loading…
Reference in New Issue
Block a user