Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deploy-helper): change helper functions' visibility to internal for reuse #141

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions script/utils/DeployHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -902,20 +902,20 @@ contract DeployHelper is
}

/// @dev Get the deterministic deployed address of a contract with CREATE3
function _getDeployedAddress(string memory name) private view returns (address) {
function _getDeployedAddress(string memory name) internal view returns (address) {
return create3Deployer.getDeployed(_getSalt(name));
}

/// @dev Load the implementation address from the proxy contract
function _loadProxyImpl(address proxy) private view returns (address) {
function _loadProxyImpl(address proxy) internal view returns (address) {
return address(uint160(uint256(vm.load(proxy, IMPLEMENTATION_SLOT))));
}

function _predeploy(string memory contractKey) private view {
function _predeploy(string memory contractKey) internal view {
if (writeDeploys) console2.log(string.concat("Deploying ", contractKey, "..."));
}

function _postdeploy(string memory contractKey, address newAddress) private {
function _postdeploy(string memory contractKey, address newAddress) internal {
if (writeDeploys) {
_writeAddress(contractKey, newAddress);
console2.log(string.concat(contractKey, " deployed to:"), newAddress);
Expand Down
Loading