Add bytecode generator for cic contracts unittests
This commit is contained in:
@@ -11,9 +11,7 @@ from chainlib.eth.tx import TxFactory
|
||||
from chainlib.eth.tx import TxFormat
|
||||
from chainlib.eth.contract import ABIContractEncoder
|
||||
from chainlib.eth.contract import ABIContractType
|
||||
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
contract_dir = os.path.join(script_dir, '..', '..', 'solidity')
|
||||
from cic_contracts.unittest import bytecode
|
||||
|
||||
logg = logging.getLogger(__name__)
|
||||
|
||||
@@ -28,9 +26,7 @@ class TestEthCapped(EthTesterCase):
|
||||
self.conn = RPCConnection.connect(self.chain_spec, 'default')
|
||||
nonce_oracle = RPCNonceOracle(self.accounts[0], self.conn)
|
||||
|
||||
f = open(os.path.join(contract_dir, 'CappedTest.bin'))
|
||||
code = f.read()
|
||||
f.close()
|
||||
code = bytecode('capped')
|
||||
|
||||
txf = TxFactory(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
|
||||
tx = txf.template(self.accounts[0], None, use_nonce=True)
|
||||
|
||||
Reference in New Issue
Block a user