Skip to content

vm.serializeString might produce numbers #4601

@sakulstra

Description

@sakulstra

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

No response

What command(s) is the bug in?

No response

Operating System

Linux

Describe the bug

There's some unexpected behavior with vm.serializeString.

When using

string memory out = vm.serializeString(key, key, '10000000000000');
vm.writeJson(out, path);

It seems like foundry will automatically convert the string to a number if it looks like a number.
This is somewhat unexpected and it hard to work with consumer languages that don't natively support big numbers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions