-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathTestProxy.sol
38 lines (33 loc) · 938 Bytes
/
TestProxy.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// SPDX-License-Identifier: Unlicense
pragma solidity 0.8.25;
import "@openzeppelin/contracts/proxy/Proxy.sol";
import "@openzeppelin/contracts/utils/Address.sol";
/**
* @title Test proxy for peripheral contracts
* @author MetaStreet Labs
*/
contract TestProxy is Proxy {
/**
* @dev Space for implementation storage
*/
uint256[128] private __reserved;
/**
* @dev Implementation contract
*/
address private _impl;
/**
* @notice TestProxy constructor
* @param implementation Implementation contract
* @param data Initialization calldata
*/
constructor(address implementation, bytes memory data) {
_impl = implementation;
Address.functionDelegateCall(implementation, data);
}
/*
* @dev Proxy implementation address hook
*/
function _implementation() internal view virtual override returns (address) {
return _impl;
}
}