This RPC call works great when using a bundler not managed by Alchemy. However, an error is triggered when using your bundler.
cast rpc eth_estimateUserOperationGas "{\"sender\":\"0x80b86933313237be38B9E87dDbe99865A12c8ddd\",\"nonce\":\"0x0\",\"initCode\":\"0x29e69af6083f790d31804ed9adad40ccc32accc9af09872500000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000120728da5b63228c33d0f2e2797ee87fda099a2795a31831d5e8f406a4a8be80ad4000000000000000000000000000000000000000000000000000000000000009849960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97635d00000000fbfc3007154e4ecc8c0b6e020557d7bd0014f4da2a72a853013e7a71eab983e798c0d3e190c6a5010203262001215820551be8f48a4b2d77a8cf8fe565fd8644c77f44aef04099b6764acf668a5dea0f225820e92de8f6a8d71246b08f68a8cfc10de82ee97f51b4cd585d978a1097931fc7720000000000000000000000000000000000000000000000000000000000000000000000000000004200f7aabdbddb526bb02fc3a1138ae375236d229c571509109d5ba7d5dd1591c6c058cbe00ad06e311706a0bb4a2d7cc8732a27a6f88d110c8e6376bdf53c2635f91c000000000000000000000000000000000000000000000000000000000000\",\"callData\":\"0xb61d27f6000000000000000000000000770be037c2e8b80e1e2c27ab1dbcf19ecfb022370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000041249c58b00000000000000000000000000000000000000000000000000000000\",\"callGasLimit\":\"0x88b8\",\"verificationGasLimit\":\"0x11170\",\"preVerificationGas\":\"0x5208\",\"maxFeePerGas\":\"0x11401c\",\"maxPriorityFeePerGas\":\"0x113e10\",\"paymasterAndData\":\"0x904dff443aac03cefc537a85a98c1cd590dbbcb925134e88a75fce2b422d9cc1a0ddbd9eb74d720e6226c209a30297bae08c74b617bd0240c65bb42c5d7b96acfd5b228ecb94c020e68c508b2512923c9ea994031b\",\"signature\":\"0x00f7aabdbddb526bb02fc3a1138ae375236d229c571509109d5ba7d5dd1591c6c058cbe00ad06e311706a0bb4a2d7cc8732a27a6f88d110c8e6376bdf53c2635f91c\"}" "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" --rpc-url https://public.stackup.sh/api/v1/node/optimism-sepolia{"preVerificationGas":206075716,"verificationGasLimit":396726,"callGasLimit":64706,"verificationGas":396726}
When using the RPC provided by Alchemy (https://opt-sepolia.g.alchemy.com/v2/XXXXXXX), the following error is triggered.
(code: -32500, message: validation reverted: [reason]: AA13 initCode failed or OOG, data: Some(Object {"reason": String("AA13 initCode failed or OOG")}))
What do you think? Could it be an issue from Rundler?
It works by removing the
callGasLimitandverificationGasLimitfields as pointed out by @dancoombs on the Rundler Telegram.Here is @dancoombs' explanation:
Stackup's bundler seems to ignore them and perform gas estimation anyway.