Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

SafeERC20: low-level call failed

# if you are about to lend, swap, or deposit a token,
# check if you have approved the token contract with
token = interface.IERC20(erc20_address)
tx = token.approve(approved_spender, amount, {"from": account})
# so that approved_spender can spend amount.
#
# if you have approved but still receiving an error,
# check if you have enought token amount to spend
# e.g. you approve to deposit 0.2 weth but you have only 0.1 weth in your balance

# finally, check if your gas limit is high enought
 
PREVIOUS NEXT
Tagged: #call #failed
ADD COMMENT
Topic
Name
2+8 =