@@ -14,9 +14,6 @@ contract ProxyFactory is IProxyFactory, Ownable {
1414 /// @notice Address of the master Proxy contract to be cloned
1515 address public immutable MASTER_PROXY;
1616
17- /// @dev Keccak256 hash of the init code of the clone of the master Proxy contract
18- bytes32 internal immutable MASTER_PROXY_CLONE_CODE_HASH;
19-
2017 /// @notice Whitelisted addresses allowed to create new proxies
2118 mapping (address => bool ) public whitelisted;
2219
@@ -30,15 +27,6 @@ contract ProxyFactory is IProxyFactory, Ownable {
3027 // Master proxy is never initialized - it serves only as a bytecode template.
3128 // Each clone has independent storage and is initialized separately via _initProxy.
3229 MASTER_PROXY = address (new Proxy ());
33-
34- /// @dev EIP-1167 minimal proxy bytecode format:
35- /// 3d602d80600a3d3981f3363d3d373d3d3d363d73{implementation}5af43d82803e903d91602b57fd5bf3
36- /// where {implementation} is the 20-byte address of MASTER_PROXY
37- MASTER_PROXY_CLONE_CODE_HASH = keccak256 (
38- abi.encodePacked (
39- hex "3d602d80600a3d3981f3363d3d373d3d3d363d73 " , MASTER_PROXY, hex "5af43d82803e903d91602b57fd5bf3 "
40- )
41- );
4230 }
4331
4432 /// @inheritdoc IProxyFactory
@@ -48,8 +36,13 @@ contract ProxyFactory is IProxyFactory, Ownable {
4836 }
4937
5038 /// @inheritdoc IProxyFactory
51- function getProxyInitCodeHash () external view returns (bytes32 ) {
52- return MASTER_PROXY_CLONE_CODE_HASH;
39+ function getProxyInitCode () external view returns (bytes memory ) {
40+ /// @dev EIP-1167 minimal proxy bytecode format:
41+ /// 3d602d80600a3d3981f3363d3d373d3d3d363d73{implementation}5af43d82803e903d91602b57fd5bf3
42+ /// where {implementation} is the 20-byte address of MASTER_PROXY
43+ return abi.encodePacked (
44+ hex "3d602d80600a3d3981f3363d3d373d3d3d363d73 " , MASTER_PROXY, hex "5af43d82803e903d91602b57fd5bf3 "
45+ );
5346 }
5447
5548 /// @inheritdoc IProxyFactory
0 commit comments