MCPcopy Create free account
hub / github.com/wevm/viem / constructor

Method constructor

src/errors/encoding.ts:9–28  ·  view source on GitHub ↗
({
    max,
    min,
    signed,
    size,
    value,
  }: {
    max?: string | undefined
    min: string
    signed?: boolean | undefined
    size?: number | undefined
    value: string
  })

Source from the content-addressed store, hash-verified

7}
8export class IntegerOutOfRangeError extends BaseError {
9 constructor({
10 max,
11 min,
12 signed,
13 size,
14 value,
15 }: {
16 max?: string | undefined
17 min: string
18 signed?: boolean | undefined
19 size?: number | undefined
20 value: string
21 }) {
22 super(
23 `Number "${value}" is not in safe ${
24 size ? `${size * 8}-bit ${signed ? 'signed' : 'unsigned'} ` : ''
25 }integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`,
26 { name: 'IntegerOutOfRangeError' },
27 )
28 }
29}
30
31export type InvalidBytesBooleanErrorType = InvalidBytesBooleanError & {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected