Skip to content

Conversation

2PykeETH
Copy link

Summary

This PR extends the Makefile with additional emergency management shortcuts for interacting with the deployed contract.
These commands enhance the existing emergency-pause functionality by enabling contract unpause and emergency withdrawal execution.


Changes

makefile

  • Added emergency-unpause:
    • Unpauses the contract if previously paused
    • Uses cast send with unpause() call
    • Prints a clear ⚠️ warning message before execution
  • Added emergency-withdraw:
    • Executes emergencyWithdraw(address,uint256) on the contract
    • Requires the EMERGENCY_TOKEN environment variable
    • Emits a 🚨 warning for visibility
  • Both targets leverage MAINNET_RPC_URL and PRIVATE_KEY for secure execution

Benefits

  • Improves incident response during emergencies:
    • emergency-unpause allows safe contract resumption
    • emergency-withdraw provides a mechanism to safeguard funds
  • Provides clear CLI feedback with colored messages (🚨 / ⚠️ indicators)
  • Consistent structure with existing emergency-pause target

Next Steps

  • Add testnet equivalents (emergency-unpause-testnet, emergency-withdraw-testnet) for safer dry-runs
  • Consider role-based access checks to ensure only authorized operators execute these actions
  • Integrate with CI/CD for controlled emergency ops

Notes

This PR completes the emergency response toolkit in the Makefile, ensuring that critical pause, unpause, and withdrawal operations are easily accessible to operators during urgent scenarios.

@Neros0 Neros0 self-requested a review September 24, 2025 15:20
@Neros0 Neros0 merged commit 28c269f into FlashArb-AI:main Sep 24, 2025
1 check failed
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.

2 participants