Open
Conversation
Add ability to specify a Foundry profile when integrating Etherform workflows. The profile applies to deployment, upgrade safety, and verification steps, while CI tests run with the default profile (optimizer off) to avoid test failures. Profile validation catches undefined profiles early with helpful error messages. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
c5a35b6 to
3c3048e
Compare
🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Verification is now skipped if blockscout_url is not set in network config. This allows deploying to networks without Blockscout support. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Uses process substitution instead of pipe to properly track failures across loop iterations. The step now exits with error code 1 when any contract fails verification after 3 attempts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The --guess-constructor-args flag requires an RPC URL to fetch deployed bytecode and determine constructor arguments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Restructure _deploy-testnet.yml into two jobs (read-config + deploy) so environment: can reference the config output - Add read-testnet-config and read-mainnet-config jobs to _foundry-cicd.yml - Deploy jobs now use environment: from network config for secret resolution - Secrets (PRIVATE_KEY, RPC_URL) now resolve from GitHub Environments based on the "environment" field in deploy-networks.json 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace --guess-constructor-args with explicit constructor args extracted from broadcast file. This fixes verification for contracts that use external libraries. Changes: - Extract .arguments from broadcast transactions - Get constructor signature from contract ABI via forge inspect - Encode args with cast abi-encode - Pass encoded args to forge verify-contract --constructor-args - Remove --rpc-url (only needed for guessing) - Gracefully handle contracts without constructor args 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Fix jq parse errors when processing constructor arguments: - Use jq -e to safely check if arguments array exists - Validate ABI JSON before parsing - Use mapfile to properly handle args with special characters - Pass args as bash array to preserve quoting for cast abi-encode This fixes "Invalid numeric literal" errors when arguments contain hex addresses. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Convert multiline contract-paths input to properly formatted YAML list for dorny/paths-filter. This fixes the error: "can not read a block mapping entry; a multiline key may not be an implicit key" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
@hudsonhrh can you demonstarte this working with a pr to the foundry-counter-upgradeable repo and include it in here? |
RonTuretzky
requested changes
Dec 7, 2025
Contributor
RonTuretzky
left a comment
There was a problem hiding this comment.
please rebase off of #13
|
|
||
| # Extract and verify each deployed contract with retry logic | ||
| jq -c '.transactions[] | select(.transactionType == "CREATE")' "$BROADCAST_FILE" | while read -r tx; do | ||
| # Use process substitution to avoid subshell issues with variable tracking |
Contributor
There was a problem hiding this comment.
what is this change? why is it necessary?
|
|
||
| echo "Verifying $CONTRACT_NAME at $CONTRACT_ADDR..." | ||
|
|
||
| # Build constructor args if present |
Contributor
There was a problem hiding this comment.
is this info not in the run-latest json?
| jobs: | ||
| deploy-testnet: | ||
| name: Deploy to Testnet | ||
| read-config: |
Contributor
There was a problem hiding this comment.
are we decoupling this so that it can be re-used for testnet/mainnet?
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
Major improvements to Etherform CI/CD workflows including deployment profiles, GitHub Environments support, and robust contract verification.
Features
Deployment Profiles (
deployment-foundry-profile)GitHub Environments Support
environment:from network config for per-network secrets"environment"field indeploy-networks.jsonRobust Contract Verification
blockscout_urlis omitted/empty in network config--guess-constructor-argsfailures)Commits
3ad9cf8_foundry-cicd.ymlreusable workflow3c3048edeployment-foundry-profileinput to all workflows58ddecd77f745e9d2381f7b38f11--guess-constructor-args)b9a5466f5b700ae82dcdbUsage
Network config with environments:
{ "testnets": [{ "name": "sepolia", "blockscout_url": "https://eth-sepolia.blockscout.com", "environment": "testnet-sepolia" }], "mainnets": [{ "name": "ethereum", "blockscout_url": "https://eth.blockscout.com", "environment": "production-ethereum" }] }closes #8, closes #7, closes #4
Tested with integration wit this repo https://github.com/PerpetualOrganizationArchitect/POP/actions/runs/19974105263/job/57286120003?pr=54
🤖 Generated with Claude Code