@@ -12,10 +12,6 @@ import {SpokeMessageExecutor} from "src/SpokeMessageExecutor.sol";
12
12
import {SpokeAirlock} from "src/SpokeAirlock.sol " ;
13
13
14
14
abstract contract DeploySpokeContractsBaseImpl is Script {
15
- // This should not be used for a production deploy the correct address will be set as an environment variable.
16
- uint256 constant DEFAULT_DEPLOYER_PRIVATE_KEY =
17
- uint256 (0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 );
18
-
19
15
string constant DEFAULT_DEPLOY_VERSION = "v1 " ;
20
16
21
17
struct DeploymentConfiguration {
@@ -39,13 +35,12 @@ abstract contract DeploySpokeContractsBaseImpl is Script {
39
35
40
36
function _getDeploymentConfiguration () internal virtual returns (DeploymentConfiguration memory );
41
37
38
+ /// @notice Creates a wallet for deployment using the private key from environment
39
+ /// @dev Requires DEPLOYER_PRIVATE_KEY to be set in the environment
40
+ /// @return wallet The wallet to be used for deployment
42
41
function _deploymentWallet () internal virtual returns (Vm.Wallet memory ) {
43
- uint256 deployerPrivateKey = vm.envOr ("DEPLOYER_PRIVATE_KEY " , DEFAULT_DEPLOYER_PRIVATE_KEY);
44
-
45
- Vm.Wallet memory wallet = vm.createWallet (deployerPrivateKey);
46
- Vm.Wallet memory defaultWallet = vm.createWallet (DEFAULT_DEPLOYER_PRIVATE_KEY);
47
- if (defaultWallet.addr == wallet.addr) revert InvalidAddressConfiguration ();
48
- return wallet;
42
+ uint256 deployerPrivateKey = vm.envUint ("DEPLOYER_PRIVATE_KEY " );
43
+ return vm.createWallet (deployerPrivateKey);
49
44
}
50
45
51
46
function run () public returns (DeployedContracts memory ) {
0 commit comments