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

Method constructor

src/errors/data.ts:47–62  ·  view source on GitHub ↗
({
    size,
    targetSize,
    type,
  }: {
    size: number
    targetSize: number
    type: 'hex' | 'bytes'
  })

Source from the content-addressed store, hash-verified

45}
46export class InvalidBytesLengthError extends BaseError {
47 constructor({
48 size,
49 targetSize,
50 type,
51 }: {
52 size: number
53 targetSize: number
54 type: 'hex' | 'bytes'
55 }) {
56 super(
57 `${type.charAt(0).toUpperCase()}${type
58 .slice(1)
59 .toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size} ${type} long.`,
60 { name: 'InvalidBytesLengthError' },
61 )
62 }
63}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected