Skip to content

Commit

Permalink
push hardcoded salt string
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Rubino committed Feb 1, 2025
1 parent 050b0ca commit f4ef6b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions scripts/deploy/deterministic/DeployERC20Custody.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ contract DeployERC20Custody is Script {
address expectedImplAddress;
address expectedProxyAddress;

bytes32 implSalt = keccak256("ERC20Custody-2");
bytes32 proxySalt = keccak256("ERC20CustodyProxy-2");
bytes32 implSalt = keccak256("ERC20Custody");
bytes32 proxySalt = keccak256("ERC20CustodyProxy");

// Add this specific check to ensure contract is not deployed at deterministic address with wrong admin
require(admin != address(0), "Environment variable ERC20_CUSTODY_ADMIN_ADDRESS_EVM is not set");
Expand Down Expand Up @@ -86,4 +86,4 @@ contract DeployERC20Custody is Script {
require(!erc20Custody.hasRole(erc20Custody.WHITELISTER_ROLE(), deployer), "deployer still has WHITELISTER_ROLE");
require(!erc20Custody.hasRole(erc20Custody.DEFAULT_ADMIN_ROLE(), deployer), "deployer still has DEFAULT_ADMIN_ROLE");
}
}
}
6 changes: 3 additions & 3 deletions scripts/deploy/deterministic/DeployGatewayEVM.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ contract DeployGatewayEVM is Script {
address expectedImplAddress;
address expectedProxyAddress;

bytes32 implSalt = keccak256("GatewayEVM-2");
bytes32 proxySalt = keccak256("GatewayEVMProxy-2");
bytes32 implSalt = keccak256("GatewayEVM");
bytes32 proxySalt = keccak256("GatewayEVMProxy");

// Add this specific check to ensure contract is not deployed at deterministic address with wrong admin
require(admin != address(0), "Environment variable GATEWAY_ADMIN_ADDRESS_EVM is not set");
Expand Down Expand Up @@ -82,4 +82,4 @@ contract DeployGatewayEVM is Script {
require(!gateway.hasRole(gateway.PAUSER_ROLE(), deployer), "deployer still has PAUSER_ROLE");
require(!gateway.hasRole(gateway.DEFAULT_ADMIN_ROLE(), deployer), "deployer still has DEFAULT_ADMIN_ROLE");
}
}
}

0 comments on commit f4ef6b5

Please sign in to comment.