Skip to content

getCode return value is not documented. #4054

@drortirosh

Description

@drortirosh

What is the type of issue?

No response

What is the issue?

getCode returns contract's code, but the documentation doesn't say what it returns for a contract that doesn't have code

  • the underlying RPC (eth_getCode) return "0x"
  • viem's getCode itself checks for that value and returns undefined but that behaviour is not documented

Where did you find it?

while using getCode

Metadata

Metadata

Assignees

No one assigned

    Labels

    A: DocsArea: Documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions