fix: address review feedback for #769

- Apply PRIVATE_KEY env-var fallback to UpgradeOptimizer.sol (missed in first pass)
- Add comment on zero-sentinel silent-fallback behaviour in all four scripts
- Remove spurious view modifier from BaseDeploy.run() (violated by vm.readFile)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-19 00:26:04 +00:00
parent 9632693b8a
commit db6abda17e
4 changed files with 14 additions and 3 deletions

View file

@ -37,6 +37,7 @@ contract DeployBase is Script {
IUniswapV3Pool public pool;
function run() public {
// PRIVATE_KEY=0 / empty silently falls back to .secret (0 is an invalid secp256k1 key).
uint256 privateKey = vm.envOr("PRIVATE_KEY", uint256(0));
if (privateKey == 0) {
string memory seedPhrase = vm.readFile(".secret");