MCPcopy Create free account
hub / github.com/base/base / inspector_opcode_names

Function inspector_opcode_names

crates/execution/cli/src/standard_node.rs:980–995  ·  view source on GitHub ↗

Opcode and precompile names the metering inspector can parse. Schedule `STATE_*` post-state effects are not EVM opcodes; unknown names are skipped so a loaded schedule cannot fail node startup.

(
    cli_names: impl IntoIterator<Item = String>,
    schedule_names: impl IntoIterator<Item = impl AsRef<str>>,
)

Source from the content-addressed store, hash-verified

978/// Schedule `STATE_*` post-state effects are not EVM opcodes; unknown names are
979/// skipped so a loaded schedule cannot fail node startup.
980fn inspector_opcode_names(
981 cli_names: impl IntoIterator<Item = String>,
982 schedule_names: impl IntoIterator<Item = impl AsRef<str>>,
983) -> Vec<String> {
984 let mut names: Vec<String> = cli_names.into_iter().collect();
985 for name in schedule_names {
986 let name = name.as_ref();
987 if !is_inspector_opcode_name(name) {
988 continue;
989 }
990 if !names.iter().any(|existing| existing.eq_ignore_ascii_case(name)) {
991 names.push(name.to_string());
992 }
993 }
994 names
995}
996
997fn is_inspector_opcode_name(name: &str) -> bool {
998 !name.to_ascii_uppercase().starts_with("STATE_")

Calls 6

is_inspector_opcode_nameFunction · 0.85
collectMethod · 0.45
into_iterMethod · 0.45
as_refMethod · 0.45
iterMethod · 0.45
pushMethod · 0.45