-
Notifications
You must be signed in to change notification settings - Fork 181
Description
Dear sir,
I deployed a bot-executr contract on Arbitrum using your code. Currently, I want to extract the balance of the weth, however, I encountered this error.
ValueError: Execution reverted during call: 'execution reverted: WETH BALANCE REDUCTION'. This transaction will likely revert. If you wish to broadcast, include allow_revert:True as a transaction parameter.
Here is the traction parameters:
tx_params = { "from": bot_account.address, # "from": executor_contract.address, "chainId": brownie.chain.id, "gas": TX_GAS_LIMIT, "nonce": bot_account.nonce, "maxPriorityFeePerGas":0, "value":0, }
Here is the payloads:
TX_GAS_LIMIT= 250_000_000
withdrawal_amount = int(0.2*10**18)
TOKEN_CONTRACT_ADDRESS = "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" # WETH address
payload_signature = brownie.web3.keccak(text="transfer(address,uint256)")
payload_data = eth_abi.encode_abi(
["address", "uint256"],
[bot_account.address, withdrawal_amount])
payload = payload_signature[:4] + payload_data
# Get the hex value of the payload
payload_hex = '0x' + payload.hex()
# Submit the transaction, with the appropriate token to withdraw
tx = executor_contract.execute_payloads(
[(TOKEN_CONTRACT_ADDRESS, payload_hex, 0)],
tx_params
)`
I used brownie and connect the arb-chain network. I could not find the failure reason.