Skip to content

Corpus format without Haskell ByteString Show representation #1594

Description

@rappie

Describe the desired feature

Current Situation

Bytes in Echidna corpus files use the ByteString Show representation. This produces a Haskell string literal using Haskell string-literal escape conventions, requiring other tools to understand Haskell-specific escape sequences.

{
  "tag": "SolCall",
  "contents": [
    "example",
    [
      {
        "tag": "AbiBytes",
        "contents": [2, "\"\\NUL\\255\""]
      }
    ]
  ]
}

Suggested Change

Represent bytes as 0x-prefixed hexadecimal strings instead.

{
  "tag": "SolCall",
  "contents": [
    "example",
    [
      {
        "tag": "AbiBytes",
        "contents": [2, "0x00ff"]
      }
    ]
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions