diff --git a/python/Makefile b/python/Makefile index 87f7c43..e22c5a4 100644 --- a/python/Makefile +++ b/python/Makefile @@ -1,7 +1,7 @@ -INPUTS = $(wildcard solidity/*.sol) +INPUTS = $(wildcard cic_contracts/unittest/solidity/*.sol) OUTPUTS = $(patsubst %.sol, %.bin, $(INPUTS)) -all: outs readme package +all: outs package .SUFFIXES: .sol .bin diff --git a/python/eth_expire/unittest/base.py b/python/eth_expire/unittest/base.py index afa0f3e..2921130 100644 --- a/python/eth_expire/unittest/base.py +++ b/python/eth_expire/unittest/base.py @@ -34,9 +34,9 @@ class TestEthExpire(EthTesterCase): tx = txf.template(self.accounts[0], None, use_nonce=True) date_expire = datetime.datetime.utcnow() + datetime.timedelta(seconds=10000) - self.expire = int(date_expire.timestamp()) + self.expire_value = int(date_expire.timestamp()) enc = ABIContractEncoder() - enc.uint256(self.expire) + enc.uint256(self.expire_value) args = enc.get() tx = txf.set_code(tx, code + args) @@ -49,11 +49,11 @@ class TestEthExpire(EthTesterCase): logg.debug('published expire test contract with hash {}'.format(r)) - def set_expiry(self, contract_address, sender_address, v, tx_format=TxFormat.JSONRPC): + def set_expire(self, contract_address, sender_address, v, tx_format=TxFormat.JSONRPC): nonce_oracle = RPCNonceOracle(self.accounts[0], self.conn) txf = TxFactory(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) enc = ABIContractEncoder() - enc.method('setExpiry') + enc.method('setExpire') enc.typ(ABIContractType.UINT256) enc.uint256(v) data = enc.get() diff --git a/python/eth_expire/unittest/interface.py b/python/eth_expire/unittest/interface.py index a809cc5..39bf6fc 100644 --- a/python/eth_expire/unittest/interface.py +++ b/python/eth_expire/unittest/interface.py @@ -12,20 +12,20 @@ class TestEthExpireInterface: def test_expire(self): - if self.expire == 0: + if self.expire_value == 0: return c = EthExpire(self.chain_spec) o = c.expires(self.address, sender_address=self.accounts[0]) r = self.rpc.do(o) - self.assertEqual(self.expire, int(r, 16)) + self.assertEqual(self.expire_value, int(r, 16)) def test_expire_change(self): if self.set_method == None: return - self.expire += 43200 - (tx_hash_hex, o) = self.set_method(self.address, self.accounts[0], self.expire) + self.expire_value += 43200 + (tx_hash_hex, o) = self.set_method(self.address, self.accounts[0], self.expire_value) self.rpc.do(o) o = receipt(tx_hash_hex) r = self.conn.do(o) @@ -34,4 +34,4 @@ class TestEthExpireInterface: c = EthExpire(self.chain_spec) o = c.expires(self.address, sender_address=self.accounts[0]) r = self.rpc.do(o) - self.assertEqual(self.expire, int(r, 16)) + self.assertEqual(self.expire_value, int(r, 16)) diff --git a/python/setup.cfg b/python/setup.cfg index 7f038a2..2afb6d0 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = cic-contracts -version = 0.3.4 +version = 0.3.5 description = CIC network smart contract interfaces author = Louis Holbrook author_email = dev@holbrook.no diff --git a/python/tests/test_expire.py b/python/tests/test_expire.py index 255e0d0..43be7e1 100644 --- a/python/tests/test_expire.py +++ b/python/tests/test_expire.py @@ -23,7 +23,7 @@ class TestExpireBase(TestEthExpire, TestEthExpireInterface, TestERC165): def setUp(self): super(TestExpireBase, self).setUp() self.add_interface_check('841a0e94') - self.set_method = self.set_expiry + self.set_method = self.set_expire if __name__ == '__main__':