diff --git a/.changelog/fix-simulate-revert-code.md b/.changelog/fix-simulate-revert-code.md new file mode 100644 index 0000000000..467b5b51ea --- /dev/null +++ b/.changelog/fix-simulate-revert-code.md @@ -0,0 +1,5 @@ +--- +reth-rpc-eth-types: patch +--- + +Updated `eth_simulateV1` revert error code from `-32000` to `3` to be consistent with `eth_call`, per [execution-apis#748](https://github.com/ethereum/execution-apis/pull/748). diff --git a/crates/rpc/rpc-eth-types/src/simulate.rs b/crates/rpc/rpc-eth-types/src/simulate.rs index 70c1267dc5..59d13a67c5 100644 --- a/crates/rpc/rpc-eth-types/src/simulate.rs +++ b/crates/rpc/rpc-eth-types/src/simulate.rs @@ -31,8 +31,10 @@ use revm::{ /// Error code for execution reverted in `eth_simulateV1`. /// -/// -pub const SIMULATE_REVERT_CODE: i32 = -32000; +/// Consistent with `eth_call` revert error code. +/// +/// +pub const SIMULATE_REVERT_CODE: i32 = 3; /// Error code for VM execution errors (e.g., out of gas) in `eth_simulateV1`. ///