Closed mikeghen closed 2 years ago
https://web3py.readthedocs.io/en/stable/contracts.html?highlight=transact#web3.contract.ContractFunction.estimateGas I do think this is what can be used to check failure I think if .estimateGas() throws a ValueError then its telling you the txn will fail not 100% sure, Ive not tried it
Many
distribute
calls fail forBAD_EXCHANGE_RATE
which just means the exchange price on sushi/quickswap is no good compared to the "global" price reported by tellor. Right now we just send these txns and let them fail, wasting gas.This issue is to add a pre-send check in the
ContractInteractionOperator
to check that a transaction won't fail, something like:where
confirm_success
will use web4py to verify the txn will be successful (without executing it).