Skip to content

Conversation

@AfuroIsCrazy
Copy link

@AfuroIsCrazy AfuroIsCrazy commented Nov 21, 2025

Note

Refactors the deploy script to validate/choose envs, use dynamic gas with Foundry, parse JSON output for the deployed address, and improve errors and messaging.

  • Scripts:
    • Refactor deploy/scripts/deploy_exchange.sh:
      • Add robust arg parsing and env file selection via case; validate env file exists.
      • Source selected env; print target network and deploy args.
      • Update Foundry call: quote vars, remove fixed --with-gas-price, add --slow, keep JSON --broadcast flow.
      • Post-process JSON output with jq to extract CTFExchange address; add error handling and clearer messages.
      • Include security note about sourcing private keys from env files.

Written by Cursor Bugbot for commit e74892f. This will update automatically on new commits. Configure here.

# --gas-price $(cast gas-price --rpc-url $RPC_URL)

-s "deployExchange(address,address,address,address,address)" "$ADMIN" "$COLLATERAL" "$CTF" "$PROXY_FACTORY" "$SAFE_FACTORY"
)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Missing line continuation breaks forge script command

The forge script command line continuation is broken. Line 57 ends with --slow # comment without a backslash, which terminates the command prematurely instead of continuing to the -s flag on line 65. This causes the deployment to fail because the actual script function and its arguments are never executed.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant