Skip to content

Commit 4029d83

Browse files
committed
rename TransparentUpgradeableConfiguratorProxy to ConfiguratorProxy
1 parent 90ca4d0 commit 4029d83

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Third-party contracts (e.g. OZ proxies) live under `contracts/vendor`.
6060

6161
There are currently two Comet-related contracts that extend directly from the vendor contracts. The contracts are:
6262

63-
1. **TransparentUpgradeableConfiguratorProxy**: This contract extends OZ's `TransparentUpgradeableProxy`. We override the `_beforeFallback` function so that the proxy's admin can directly call the implementation. We only need this feature for the Configurator's proxy.
63+
1. **ConfiguratorProxy**: This contract extends OZ's `TransparentUpgradeableProxy`. We override the `_beforeFallback` function so that the proxy's admin can directly call the implementation. We only need this feature for the Configurator's proxy.
6464
2. **CometProxyAdmin**: This contract extends OZ's `ProxyAdmin`. We created a new function called `deployAndUpgradeTo`, which calls `Configurator.deploy()` and upgrades Comet proxy's implementation to this newly deployed Comet contract. This function is needed so we can pass the address of the new Comet to the `Proxy.upgrade()` call in one transaction.
6565

6666
## Usage

contracts/TransparentUpgradeableConfiguratorProxy.sol renamed to contracts/ConfiguratorProxy.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import "./vendor/proxy/transparent/TransparentUpgradeableProxy.sol";
66
/**
77
* @dev A TransparentUpgradeableProxy that allows its admin to call its implementation.
88
*/
9-
contract TransparentUpgradeableConfiguratorProxy is TransparentUpgradeableProxy {
9+
contract ConfiguratorProxy is TransparentUpgradeableProxy {
1010
/**
1111
* @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and
1212
* optionally initialized with `_data` as explained in {UpgradeableProxy-constructor}.

src/deploy/Development.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import {
2020
Configurator__factory,
2121
CometProxyAdmin,
2222
CometProxyAdmin__factory,
23-
TransparentUpgradeableConfiguratorProxy,
24-
TransparentUpgradeableConfiguratorProxy__factory,
23+
ConfiguratorProxy,
24+
ConfiguratorProxy__factory,
2525
ProxyAdmin,
2626
} from '../../build/types';
2727
import { ConfigurationStruct } from '../../build/types/Comet';
@@ -222,10 +222,10 @@ export async function deployDevelopmentComet(
222222
if (deployProxy.deployConfiguratorProxy) {
223223
// Configuration proxy
224224
configuratorProxy = await deploymentManager.deploy<
225-
TransparentUpgradeableConfiguratorProxy,
226-
TransparentUpgradeableConfiguratorProxy__factory,
225+
ConfiguratorProxy,
226+
ConfiguratorProxy__factory,
227227
[string, string, string]
228-
>('TransparentUpgradeableConfiguratorProxy.sol', [
228+
>('ConfiguratorProxy.sol', [
229229
configurator.address,
230230
proxyAdmin.address,
231231
(await configurator.populateTransaction.initialize(timelock.address, cometFactory.address, configuration)).data, // new time lock is set, which we don't want

src/deploy/Network.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import {
1313
CometProxyAdmin__factory,
1414
TransparentUpgradeableProxy,
1515
TransparentUpgradeableProxy__factory,
16-
TransparentUpgradeableConfiguratorProxy,
17-
TransparentUpgradeableConfiguratorProxy__factory,
16+
ConfiguratorProxy,
17+
ConfiguratorProxy__factory,
1818
Configurator,
1919
Configurator__factory,
2020
SimpleTimelock,
@@ -144,10 +144,10 @@ export async function deployNetworkComet(
144144
if (deployProxy.deployConfiguratorProxy) {
145145
// Configuration proxy
146146
configuratorProxy = await deploymentManager.deploy<
147-
TransparentUpgradeableConfiguratorProxy,
148-
TransparentUpgradeableConfiguratorProxy__factory,
147+
ConfiguratorProxy,
148+
ConfiguratorProxy__factory,
149149
[string, string, string]
150-
>('TransparentUpgradeableConfiguratorProxy.sol', [
150+
>('ConfiguratorProxy.sol', [
151151
configurator.address,
152152
proxyAdmin.address,
153153
(await configurator.populateTransaction.initialize(timelock.address, cometFactory.address, configuration)).data, // new time lock is set, which we don't want

test/helpers.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import {
2020
SimplePriceFeed__factory,
2121
TransparentUpgradeableProxy,
2222
TransparentUpgradeableProxy__factory,
23-
TransparentUpgradeableConfiguratorProxy,
24-
TransparentUpgradeableConfiguratorProxy__factory,
23+
ConfiguratorProxy,
24+
ConfiguratorProxy__factory,
2525
CometProxyAdmin,
2626
CometProxyAdmin__factory,
2727
CometFactory,
@@ -102,7 +102,7 @@ export type Protocol = {
102102

103103
export type ConfiguratorAndProtocol = {
104104
configurator: Configurator;
105-
configuratorProxy: TransparentUpgradeableConfiguratorProxy;
105+
configuratorProxy: ConfiguratorProxy;
106106
proxyAdmin: CometProxyAdmin;
107107
cometFactory: CometFactory;
108108
cometProxy: TransparentUpgradeableProxy;
@@ -408,7 +408,7 @@ export async function makeConfigurator(opts: ProtocolOpts = {}): Promise<Configu
408408

409409
// Deploy Configurator proxy
410410
const initializeCalldata = (await configurator.populateTransaction.initialize(governor.address, cometFactory.address, configuration)).data;
411-
const ConfiguratorProxy = (await ethers.getContractFactory('TransparentUpgradeableConfiguratorProxy')) as TransparentUpgradeableConfiguratorProxy__factory;
411+
const ConfiguratorProxy = (await ethers.getContractFactory('ConfiguratorProxy')) as ConfiguratorProxy__factory;
412412
const configuratorProxy = await ConfiguratorProxy.deploy(
413413
configurator.address,
414414
proxyAdmin.address,

0 commit comments

Comments
 (0)