Skip to main content

Module event_type_helpers

Module event_type_helpers 

Source

Functions§

event_type_base_name
Extract the base name from a potentially scoped event type. “ore::RoundState” -> “RoundState” “RoundState” -> “RoundState” (backwards compat)
event_type_program
Extract the program name from a scoped event type. “ore::RoundState” -> Some(“ore”) “RoundState” -> None
scoped_event_type
Create a scoped event type name. (“ore”, “Round”, false) -> “ore::RoundState” (“ore”, “Deploy”, true) -> “ore::DeployIxState”
strip_event_type_suffix
Strip the “State” or “IxState” suffix from a potentially scoped event type, returning just the base account/instruction name. “ore::RoundState” -> “Round” “ore::DeployIxState” -> “Deploy” “RoundState” -> “Round”