feat(scripts): add Safe Transaction Builder JSON output to fund-safe#431
Open
feat(scripts): add Safe Transaction Builder JSON output to fund-safe#431
Conversation
Generates a ready-to-import JSON batch file (Safe Transaction Builder format) in addition to the existing human-readable output. Use --output batch.json to write directly to a file and avoid terminal line-wrapping issues that corrupt the hex calldata when copy-pasting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Safe Transaction Builder JSON batch output to the existing fund-safe helper script so operators can import a pre-built 3-transaction batch into the Safe UI (optionally writing directly to a file to avoid copy/paste issues).
Changes:
- Generate a Safe Transaction Builder–compatible JSON batch (3 transactions) alongside the existing human-readable output
- Compute and include the Safe batch checksum (
keccak256of the JSON without the checksum field) - Add
--output <file>to write the JSON batch to disk
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--output <file>flag to write the JSON directly to disk, avoiding terminal line-wrapping that corrupts hex calldata when copy-pastingTest plan
--network calibrationand--network mainnetand verify contract addresses are correct for each--output batch.jsonand confirm the file is valid JSON (python3 -c "import json; json.load(open('batch.json'))")🤖 Generated with Claude Code