Skip to content

Commit 3ae845d

Browse files
committed
v0.1.10 made web3.js revert detection work with most non-standard RPC revert responses.
1 parent df7a0be commit 3ae845d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

IceCreamSwapWeb3/Web3ErrorHandlerPatch.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,8 @@ def raise_contract_logic_error_on_revert(response: RPCResponse) -> RPCResponse:
119119
# Geth Revert with error message and code 3 case:
120120
if error.get("code") == 3:
121121
raise ContractLogicError(message, data=data)
122-
# Geth Revert without error message case:
123-
elif "execution reverted" in message:
124-
raise ContractLogicError("execution reverted", data=data)
122+
elif "revert" in message.lower():
123+
raise ContractLogicError(message, data=data)
125124

126125
return response
127126

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from setuptools import setup, find_packages
22

3-
VERSION = '0.1.9'
3+
VERSION = '0.1.10'
44
DESCRIPTION = 'IceCreamSwap Web3.py wrapper'
55
LONG_DESCRIPTION = 'IceCreamSwap Web3.py wrapper with automatic retries, multicall and other advanced functionality'
66

0 commit comments

Comments
 (0)