MCPcopy Index your code
hub / github.com/MetaMask/rpc-errors / isValidCode

Function isValidCode

src/utils.ts:87–89  ·  view source on GitHub ↗
(code: unknown)

Source from the content-addressed store, hash-verified

85 * @returns Whether the given code is valid.
86 */
87export function isValidCode(code: unknown): code is number {
88 return Number.isInteger(code);
89}
90
91/**
92 * Serializes the given error to an Ethereum JSON RPC-compatible error object.

Callers 1

getMessageFromCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…