Fix ambigous msg when infura id isn't set during rpc code call (#1480)

* Add error check when infura id is unspecified for an on-chain code request

* Update eth-hash
pull/1483/head
Nikhil Parasaram 4 years ago committed by GitHub
parent 2518cc8b65
commit 9b0c6d1718
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      mythril/mythril/mythril_disassembler.py
  2. 2
      requirements.txt
  3. 2
      setup.py

@ -129,6 +129,11 @@ class MythrilDisassembler:
if not re.match(r"0x[a-fA-F0-9]{40}", address):
raise CriticalError("Invalid contract address. Expected format is '0x...'.")
if self.eth is None:
raise CriticalError(
"Please check whether the Infura key is set or use a different RPC method."
)
try:
code = self.eth.eth_getCode(address)
except FileNotFoundError as e:

@ -6,7 +6,7 @@ eth_abi==1.3.0
eth-account>=0.1.0a2,<=0.3.0
ethereum>=2.3.2
ethereum-input-decoder>=0.2.2
eth-hash>=0.1.0
eth-hash>=0.3.1
eth-keyfile>=0.5.1
eth-keys>=0.2.0b3,<0.3.0
eth-rlp>=0.1.0

@ -36,7 +36,7 @@ REQUIRED = [
"plyvel",
"eth_abi==1.3.0",
"eth-account>=0.1.0a2,<=0.3.0",
"eth-hash<0.3.0",
"eth-hash>=0.3.1",
"eth-keyfile>=0.5.1",
"eth-keys>=0.2.0b3,<0.3.0",
"eth-rlp>=0.1.0",

Loading…
Cancel
Save