harb/onchain/script/BaseDeploy.sol
openhands 9632693b8a fix: BootstrapVWAPPhase2.s.sol hardcodes .secret file dependency (#769)
Check PRIVATE_KEY env var first in BootstrapVWAPPhase2.s.sol, DeployBase.sol,
and BaseDeploy.sol; fall back to .secret seed-phrase file when unset.
This allows CI/CD environments to inject keys via environment variables
while preserving the existing local .secret workflow unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 00:03:59 +00:00

16 lines
451 B
Solidity

pragma solidity ^0.8.19;
import "forge-std/Script.sol";
contract BaseDeploy is Script {
function run() public view {
// Base data
uint256 privateKey = vm.envOr("PRIVATE_KEY", uint256(0));
if (privateKey == 0) {
string memory seedPhrase = vm.readFile(".secret");
privateKey = vm.deriveKey(seedPhrase, 0);
}
address sender = vm.addr(privateKey);
console.log(sender);
}
}