diff --git a/catalyst/marketplace/marketplace.py b/catalyst/marketplace/marketplace.py index 498c44b1..50bacb08 100644 --- a/catalyst/marketplace/marketplace.py +++ b/catalyst/marketplace/marketplace.py @@ -246,7 +246,10 @@ class Marketplace: ) }) - balance = Web3.toInt(hexstr=balance) + try: + balance = Web3.toInt(balance) # web3 >= 4.0.0b7 + except TypeError: + balance = Web3.toInt(hexstr=balance) # web3 <= 4.0.0b6 if balance > grains: print('OK.')