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

Method assert_failed

crates/common/precompile-storage/src/error.rs:109–111  ·  view source on GitHub ↗

Creates an assertion-failure panic error (Solidity `Panic(0x01)`). Use for internal invariants that must always hold. It is classified as a system error (see [`Self::is_system_error`]) so it propagates and fails the transaction rather than surfacing as a catchable revert.

()

Source from the content-addressed store, hash-verified

107 /// system error (see [`Self::is_system_error`]) so it propagates and fails
108 /// the transaction rather than surfacing as a catchable revert.
109 pub const fn assert_failed() -> Self {
110 Self::Panic(PanicKind::Assert)
111 }
112
113 /// ABI-encodes this error and wraps it as a [`PrecompileResult`] (revert or fatal error).
114 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected