Handle an edgecase from local host clients (#1550)

* Handle an edgecase from local host clients

* Fix eth-typing
pull/1551/head
Nikhil Parasaram 3 years ago committed by GitHub
parent 53f90cfb5f
commit aacb04a226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      mythril/support/loader.py
  2. 2
      requirements.txt
  3. 2
      setup.py

@ -37,9 +37,12 @@ class DynLoader:
if not self.eth: if not self.eth:
raise ValueError("Cannot load from the storage when eth is None") raise ValueError("Cannot load from the storage when eth is None")
return self.eth.eth_getStorageAt( value = self.eth.eth_getStorageAt(
contract_address, position=index, block="latest" contract_address, position=index, block="latest"
) )
if value == "0x":
value = "0x0000000000000000000000000000000000000000000000000000000000000000"
return value
@functools.lru_cache(LRU_CACHE_SIZE) @functools.lru_cache(LRU_CACHE_SIZE)
def read_balance(self, address: str) -> str: def read_balance(self, address: str) -> str:

@ -11,7 +11,7 @@ eth-keyfile>=0.5.1
eth-keys>=0.2.0b3,<0.4.0 eth-keys>=0.2.0b3,<0.4.0
eth-rlp>=0.1.0 eth-rlp>=0.1.0
eth-tester eth-tester
eth-typing>=2.0.0 eth-typing<3.0.0,>=2.1.0
eth-utils<2 eth-utils<2
jinja2>=2.9 jinja2>=2.9
mock mock

@ -41,7 +41,7 @@ REQUIRED = [
"eth-keys>=0.2.0b3,<0.3.0", "eth-keys>=0.2.0b3,<0.3.0",
"eth-rlp>=0.1.0", "eth-rlp>=0.1.0",
"eth-tester==0.1.0b32", "eth-tester==0.1.0b32",
"eth-typing>=2.0.0", "eth-typing<3.0.0,>=2.1.0",
"eth-utils==1.9.0", "eth-utils==1.9.0",
"coverage", "coverage",
"jinja2>=2.9", "jinja2>=2.9",

Loading…
Cancel
Save