Skip to content

Conversation

0xrusowsky
Copy link
Contributor

@0xrusowsky 0xrusowsky commented Aug 28, 2025

Motivation

last week we introduced writeJsonUpsert and writeTomlUpsert, which were 2 new cheatcodes that added the ability to not only update (like the previously existing writeJson and writeToml cheats), but also to add new k-v pairs:

after internal discussion, and given the fact that there were several community members asking for that feature:

this PR consolidates both cheatcodes into one: keeps the original name, but the new implementation with upsert capabilities

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@0xrusowsky 0xrusowsky marked this pull request as ready for review August 28, 2025 08:11
@0xrusowsky 0xrusowsky merged commit 29bed4f into master Aug 28, 2025
22 checks passed
@0xrusowsky 0xrusowsky deleted the rusowsky/cheats-write branch August 28, 2025 08:24
@github-project-automation github-project-automation bot moved this to Done in Foundry Aug 28, 2025
@0xrusowsky 0xrusowsky linked an issue Aug 28, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

vm.writeJson should also be able to add new keys
3 participants