Skip to content

Commit

Permalink
[CHAIN-49] add constants so named proxies have different bytecode (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
eyqs authored Sep 16, 2024
1 parent d09bfc2 commit 0b0dfaf
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nest/src/proxy/AggregateTokenProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy
*/
contract AggregateTokenProxy is ERC1967Proxy {

/// @notice Name of the proxy, used to ensure each named proxy has unique bytecode
bytes32 public constant PROXY_NAME = keccak256("AggregateTokenProxy");

constructor(address logic, bytes memory data) ERC1967Proxy(logic, data) { }

/// @dev Fallback function to silence compiler warnings
receive() external payable { }

}
6 changes: 6 additions & 0 deletions nest/src/proxy/FakeComponentTokenProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy
*/
contract FakeComponentTokenProxy is ERC1967Proxy {

/// @notice Name of the proxy, used to ensure each named proxy has unique bytecode
bytes32 public constant PROXY_NAME = keccak256("FakeComponentTokenProxy");

constructor(address logic, bytes memory data) ERC1967Proxy(logic, data) { }

/// @dev Fallback function to silence compiler warnings
receive() external payable { }

}
6 changes: 6 additions & 0 deletions nest/src/proxy/NestStakingProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy
*/
contract NestStakingProxy is ERC1967Proxy {

/// @notice Name of the proxy, used to ensure each named proxy has unique bytecode
bytes32 public constant PROXY_NAME = keccak256("NestStakingProxy");

constructor(address logic, bytes memory data) ERC1967Proxy(logic, data) { }

/// @dev Fallback function to silence compiler warnings
receive() external payable { }

}
6 changes: 6 additions & 0 deletions p/src/proxy/PProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy
*/
contract PProxy is ERC1967Proxy {

/// @notice Name of the proxy, used to ensure each named proxy has unique bytecode
bytes32 public constant PROXY_NAME = keccak256("PProxy");

constructor(address logic, bytes memory data) ERC1967Proxy(logic, data) { }

/// @dev Fallback function to silence compiler warnings
receive() external payable { }

}

0 comments on commit 0b0dfaf

Please sign in to comment.