Skip to content

serializeJson cheatcode  #5745

@vdrg

Description

@vdrg

Component

Forge

Describe the feature you would like

Add a new serializeJson(string calldata objectKey, string calldata value) cheatcode (naming might not be the best), which adds the provided json string to serialized_jsons directly as a new object.

Currently it is possible to "create" a new serialized json in the state by specifying an id and a key, but it is not possible to start from an existing json string. serializeJson should just insert the value to the serialized_jsons or overwrite with value if the id already exists.

If this makes sense and there is interest I can try to implement it :)

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions