Closed sshmaxime closed 2 weeks ago
Additionally, when i try to send the eth_estimateUserOperationGas
manually over curl to Rundler
, I'm getting this:
{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params","data":"data did not match any variant of untagged enum RpcUserOperationOptionalGas"},"id":44}
This is the command I run:
curl --request POST \
--url http://localhost:8546 \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"method": "eth_estimateUserOperationGas",
"params": [
{
"sender": "0xB795f0D4A90181C236ddb5f9E637Ea8a413aA9ef",
"nonce": "0x0",
"initCode": "0x29e69af6083f790d31804ed9adad40ccc32accc9af09872500000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000120728da5b63228c33d0f2e2797ee87fda099a2795a31831d5e8f406a4a8be80ad4000000000000000000000000000000000000000000000000000000000000009849960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97635d00000000fbfc3007154e4ecc8c0b6e020557d7bd001484f830e63015dcad3ef49e63901b98d59a352d45a5010203262001215820b677f3421a3c1afd27fb9a73b2ed15e0c6c784ebeba33e1dc32e3b7ddeafdf1722582031febbbf065dfb105c7e4f96524042c17b352ebff3c50f034e760bc34c5ff53500000000000000000000000000000000000000000000000000000000000000000000000000000042005e0fc121253f5ff3a16f2793c180aa743688a4f8ad580cfd6127cb8c06f2d9f57f6525bd5b9e56273184751fb805d14321246115b5afb58cffdf7aea047d94c21b000000000000000000000000000000000000000000000000000000000000",
"callData": "0xb61d27f6000000000000000000000000770be037c2e8b80e1e2c27ab1dbcf19ecfb0223700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000041249c58b00000000000000000000000000000000000000000000000000000000",
"callGasLimit": "0x0",
"verificationGasLimit": "0x0",
"preVerificationGas": "0x0",
"maxFeePerGas": "0x0",
"maxPriorityFeePerGas": "0x0",
"paymasterAndData": "0x904dff443aac03cefc537a85a98c1cd590dbbcb90cece08a6cf646848b003ce0e64d2bcdf93a883b2d82e4b80671cd57545b5820349ad72ef85b4fb559d71c9f2275377e6ab46c11517d6ccc4da2b4004cb9513b1c",
"signature": "0x005e0fc121253f5ff3a16f2793c180aa743688a4f8ad580cfd6127cb8c06f2d9f57f6525bd5b9e56273184751fb805d14321246115b5afb58cffdf7aea047d94c21b"
},
"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
],
"id": 44,
"jsonrpc": "2.0"
}
'
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Can this issue be re-opened please ?
Your Method not found
issue above is because you sent eth_estimateUserOperationGas
on http://localhost:8545
, which is the port that Anvil is running on. Only the bundler supports that RPC endpoint so you'll need to send it on 8546
.
data did not match any variant of untagged enum RpcUserOperationOptionalGas
You have an odd number of hex characters in your callData
field. I added a 0 at the end and it worked. This is on the feat/v0.4
branch which changed some of our serde logic (moved to using alloy/ruint for U256), so you might find a different answer on main for those 0x0
values which are also technically invalid hex.
0x0
will be accepted in v0.4 once released due to https://github.com/recmo/uint/blob/780f5d3173b85b6c91f52842763372fc953ad637/src/support/serde.rs#L21
Describe the bug I'm running an instance of
Rundler
(running on port8546
) andAnvil
(running on port8545
) locally throughdocker-compose
and upon callingeth_estimateUserOperationGas
it fails with:SERVER_ERROR
Method not found
Something that caught my attention is that for reasons that I cannot explain, inside the RPC error payload returned by my server, the URL is set to my
anvil
node. That being said, I double checked everything and I'm 100% sure that the request goes toRundler
which then seems to pass it to thenanvil
node. I'm a bit lost here to be honest.Can anyone help or has any idea where I did something wrong ? Thank you very much !
docker-compose.yaml:
Full JSON RPC error: