def deploy_auxiliary_tester(tester_chain, tester_nettingchannel_library_address): contracts_path = os.path.join(get_project_root(), 'smart_contracts') raiden_remap = 'raiden={}'.format(contracts_path) contract_libraries = { 'NettingChannelLibrary': hexlify(tester_nettingchannel_library_address), } auxiliary_tester_compiled = _solidity.compile_contract( get_relative_contract(__file__, 'AuxiliaryTester.sol'), 'AuxiliaryTester', contract_libraries, extra_args=raiden_remap ) auxiliary_tester_address = tester_chain.contract( auxiliary_tester_compiled['bin'], language='evm', sender=tester.k0 ) auxiliary = tester.ABIContract( tester_chain, auxiliary_tester_compiled['abi'], auxiliary_tester_address ) tester_chain.mine(number_of_blocks=1) return auxiliary
def deploy_decoder_tester(tester_state, tester_nettingchannel_library_address): contracts_path = os.path.join(get_project_root(), 'smart_contracts') raiden_remap = 'raiden={}'.format(contracts_path) decoder = tester_state.abi_contract( None, path=get_relative_contract(__file__, 'DecoderTester.sol'), language='solidity', libraries={'NettingChannelLibrary': tester_nettingchannel_library_address.encode('hex')}, extra_args=raiden_remap, ) tester_state.mine(number_of_blocks=1) return decoder