diff --git a/ethereum/_solidity.py b/ethereum/_solidity.py index c76fa88e1..4efd4528e 100644 --- a/ethereum/_solidity.py +++ b/ethereum/_solidity.py @@ -335,7 +335,7 @@ def _code_or_path(sourcecode, path, contract_name, libraries, combined, extra_ar last_contract = all_contract_names[-1] result = compile_code(sourcecode, libraries=libraries, combined=combined, extra_args=extra_args) - return result[last_contract] + return result[contract_name] if contract_name else result[last_contract] @classmethod def compile(cls, code, path=None, libraries=None, contract_name='', extra_args=None): diff --git a/ethereum/abi.py b/ethereum/abi.py index 141327c58..53d238b30 100644 --- a/ethereum/abi.py +++ b/ethereum/abi.py @@ -798,7 +798,7 @@ def dec(typ, arg): # Dynamic-sized strings are encoded as + if base in ('string', 'bytes') and not sub: L = big_endian_to_int(arg[:32]) - assert len(arg[32:]) == ceil32(L), "Wrong data size for string/bytes object" + # assert len(arg[32:]) == ceil32(L), "Wrong data size for string/bytes object" return arg[32:][:L] # Dynamic-sized arrays elif sz is None: