Conversation
| # Define the environment file names. | ||
| LOCAL_ENV=".env.local" | ||
| TESTNET_ENV=".env.testnet" | ||
| MAINNET_ENV=".env.mainnet" # Renamed from '.env' for clarity/safety |
There was a problem hiding this comment.
Bug: Mainnet environment file renamed breaks existing deployments
The mainnet environment file was renamed from .env to .env.mainnet, breaking existing deployments. Users with the previously expected .env file will encounter a "file not found" error when deploying to mainnet, as the script now looks for .env.mainnet instead.
| EXCHANGE=$(echo "$OUTPUT" | jq -r '.returns.exchange.value') | ||
|
|
||
| echo "Complete!" | ||
| if [ -z "$EXCHANGE" ]; then |
There was a problem hiding this comment.
Bug: Null value not detected in exchange address validation
The validation checks if $EXCHANGE is empty, but jq -r returns the string "null" when the JSON path doesn't exist, not an empty string. This allows the script to report success with "Exchange deployed: null" when the deployment actually failed to return a valid address.
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.
Note
Refactors
deploy_exchange.shfor safer env handling, stricter validation, robust forge execution, and direct JSON parsing.deploy/scripts/deploy_exchange.sh:.env->.env.mainnet) and select viacase.PKbefore deploy.--with-gas-price, pass deploy args explicitly.jq(nogrep), validateexchangeaddress.Written by Cursor Bugbot for commit bf77d59. This will update automatically on new commits. Configure here.