Open ghost opened 2 years ago
thor_receipt_convert_to_eth_receipt
also throw error
ERROR:root:list index out of range
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/jsonrpcserver/dispatcher.py", line 134, in handle_exceptions
yield handler
File "/usr/local/lib/python3.8/dist-packages/jsonrpcserver/async_dispatcher.py", line 41, in safe_call
result = await call(
File "/usr/local/lib/python3.8/dist-packages/jsonrpcserver/async_dispatcher.py", line 34, in call
return await validate_args(method, *args, **kwargs)(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/gear/rpc.py", line 28, in wrapper
raise e
File "/usr/local/lib/python3.8/dist-packages/gear/rpc.py", line 22, in wrapper
result = await func(*args, **kw)
File "/usr/local/lib/python3.8/dist-packages/gear/rpc.py", line 244, in eth_getTransactionReceipt
return await thor.get_transaction_receipt(tx_hash)
File "/usr/local/lib/python3.8/dist-packages/gear/thor/client.py", line 139, in get_transaction_receipt
return None if receipt is None else thor_receipt_convert_to_eth_receipt(receipt)
File "/usr/local/lib/python3.8/dist-packages/gear/utils/compat.py", line 64, in thor_receipt_convert_to_eth_receipt
"contractAddress": None if receipt["reverted"] else receipt["outputs"][0]["contractAddress"],
IndexError: list index out of range
error log
On block number 11006969 (0xa7f3f9) it has transaction with 0x897a17e5781a096076b63e887baa27f5289edf1a6d392b1c5271ab82b68de782 hash.
Because the clauses of the transaction is an empty array, it throws error on
thor_tx_convert_to_eth_tx(tx)
Is
if len(tx['clauses']) > 0 else None
could be a correct patch?