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

Method constructor

src/errors/contract.ts:269–286  ·  view source on GitHub ↗
({
    functionName,
    cause,
  }: {
    functionName: string
    cause?: BaseError | Error | undefined
  })

Source from the content-addressed store, hash-verified

267 }
268export class ContractFunctionZeroDataError extends BaseError {
269 constructor({
270 functionName,
271 cause,
272 }: {
273 functionName: string
274 cause?: BaseError | Error | undefined
275 }) {
276 super(`The contract function "${functionName}" returned no data ("0x").`, {
277 metaMessages: [
278 'This could be due to any of the following:',
279 ` - The contract does not have the function "${functionName}",`,
280 ' - The parameters passed to the contract function may be invalid, or',
281 ' - The address is not a contract.',
282 ],
283 name: 'ContractFunctionZeroDataError',
284 cause,
285 })
286 }
287}
288
289export type CounterfactualDeploymentFailedErrorType =

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected