Skip to content

Commit 7003386

Browse files
committed
ethereum: Catch invalid opcode revert on Geth
1 parent cc62a92 commit 7003386

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

chain/ethereum/src/ethereum_adapter.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,12 @@ where
441441

442442
// Deterministic Geth execution errors. We might need to expand this as
443443
// subgraphs come across other errors. See
444-
// https://github.com/ethereum/go-ethereum/blob/cd57d5cd38ef692de8fbedaa56598b4e9fbfbabc/core/vm/errors.go#L25
445-
const GETH_EXECUTION_ERRORS: &[&str] =
446-
&["execution reverted", "invalid jump destination"];
444+
// https://github.com/ethereum/go-ethereum/blob/cd57d5cd38ef692de8fbedaa56598b4e9fbfbabc/core/vm/errors.go
445+
const GETH_EXECUTION_ERRORS: &[&str] = &[
446+
"execution reverted",
447+
"invalid jump destination",
448+
"invalid opcode",
449+
];
447450

448451
let as_solidity_revert_with_reason = |bytes: &[u8]| {
449452
let solidity_revert_function_selector =

0 commit comments

Comments
 (0)