@@ -5,7 +5,6 @@ pragma solidity 0.8.26;
55import { ContractHelper } from "../lib/common/src/libs/ContractHelper.sol " ;
66import { Proxy } from "../lib/common/src/Proxy.sol " ;
77
8- import { EarnerManager } from "../src/EarnerManager.sol " ;
98import { WrappedMTokenMigratorV1 } from "../src/WrappedMTokenMigratorV1.sol " ;
109import { WrappedMToken } from "../src/WrappedMToken.sol " ;
1110
@@ -17,9 +16,6 @@ contract DeployBase {
1716 * @param swapFacility_ The address of the SwapFacility contract.
1817 * @param excessDestination_ The address of the excess destination.
1918 * @param wrappedMMigrationAdmin_ The address of the Wrapped M Migration Admin.
20- * @param earnerManagerMigrationAdmin_ The address of the Earner Manager Migration Admin.
21- * @return earnerManagerImplementation_ The address of the deployed Earner Manager implementation.
22- * @return earnerManagerProxy_ The address of the deployed Earner Manager proxy.
2319 * @return wrappedMTokenImplementation_ The address of the deployed Wrapped M Token implementation.
2420 * @return wrappedMTokenProxy_ The address of the deployed Wrapped M Token proxy.
2521 */
@@ -28,29 +24,10 @@ contract DeployBase {
2824 address registrar_ ,
2925 address excessDestination_ ,
3026 address swapFacility_ ,
31- address wrappedMMigrationAdmin_ ,
32- address earnerManagerMigrationAdmin_
33- )
34- public
35- virtual
36- returns (
37- address earnerManagerImplementation_ ,
38- address earnerManagerProxy_ ,
39- address wrappedMTokenImplementation_ ,
40- address wrappedMTokenProxy_
41- )
42- {
43- // Earner Manager Implementation constructor needs only known values.
44- // Earner Manager Proxy constructor needs `earnerManagerImplementation_`.
45- // Wrapped M Token Implementation constructor needs `earnerManagerProxy_`.
46- // Wrapped M Token Proxy constructor needs `wrappedMTokenImplementation_`.
47-
48- earnerManagerImplementation_ = address (new EarnerManager (registrar_, earnerManagerMigrationAdmin_));
49-
50- earnerManagerProxy_ = address (new Proxy (earnerManagerImplementation_));
51-
27+ address wrappedMMigrationAdmin_
28+ ) public virtual returns (address wrappedMTokenImplementation_ , address wrappedMTokenProxy_ ) {
5229 wrappedMTokenImplementation_ = address (
53- new WrappedMToken (mToken_, registrar_, earnerManagerProxy_, excessDestination_, swapFacility_, wrappedMMigrationAdmin_)
30+ new WrappedMToken (mToken_, registrar_, excessDestination_, swapFacility_, wrappedMMigrationAdmin_)
5431 );
5532
5633 wrappedMTokenProxy_ = address (new Proxy (wrappedMTokenImplementation_));
@@ -63,9 +40,6 @@ contract DeployBase {
6340 * @param excessDestination_ The address of the excess destination.
6441 * @param swapFacility_ The address of the SwapFacility contract.
6542 * @param wrappedMMigrationAdmin_ The address of the Wrapped M Migration Admin.
66- * @param earnerManagerMigrationAdmin_ The address of the Earner Manager Migration Admin.
67- * @return earnerManagerImplementation_ The address of the deployed Earner Manager implementation.
68- * @return earnerManagerProxy_ The address of the deployed Earner Manager proxy.
6943 * @return wrappedMTokenImplementation_ The address of the deployed Wrapped M Token implementation.
7044 * @return wrappedMTokenMigrator_ The address of the deployed Wrapped M Token Migrator.
7145 */
@@ -75,29 +49,10 @@ contract DeployBase {
7549 address excessDestination_ ,
7650 address swapFacility_ ,
7751 address wrappedMMigrationAdmin_ ,
78- address earnerManagerMigrationAdmin_ ,
7952 address [] memory earners_
80- )
81- public
82- virtual
83- returns (
84- address earnerManagerImplementation_ ,
85- address earnerManagerProxy_ ,
86- address wrappedMTokenImplementation_ ,
87- address wrappedMTokenMigrator_
88- )
89- {
90- // Earner Manager Implementation constructor needs only known values.
91- // Earner Manager Proxy constructor needs `earnerManagerImplementation_`.
92- // Wrapped M Token Implementation constructor needs `earnerManagerProxy_`.
93- // Migrator needs `wrappedMTokenImplementation_` addresses.
94-
95- earnerManagerImplementation_ = address (new EarnerManager (registrar_, earnerManagerMigrationAdmin_));
96-
97- earnerManagerProxy_ = address (new Proxy (earnerManagerImplementation_));
98-
53+ ) public virtual returns (address wrappedMTokenImplementation_ , address wrappedMTokenMigrator_ ) {
9954 wrappedMTokenImplementation_ = address (
100- new WrappedMToken (mToken_, registrar_, earnerManagerProxy_, excessDestination_, swapFacility_, wrappedMMigrationAdmin_)
55+ new WrappedMToken (mToken_, registrar_, excessDestination_, swapFacility_, wrappedMMigrationAdmin_)
10156 );
10257
10358 wrappedMTokenMigrator_ = address (new WrappedMTokenMigratorV1 (wrappedMTokenImplementation_, earners_));
@@ -107,67 +62,29 @@ contract DeployBase {
10762 * @dev Mock deploys Wrapped M Token, returning the would-be addresses.
10863 * @param deployer_ The address of the deployer.
10964 * @param deployerNonce_ The nonce of the deployer.
110- * @return earnerManagerImplementation_ The address of the would-be Earner Manager implementation.
111- * @return earnerManagerProxy_ The address of the would-be Earner Manager proxy.
11265 * @return wrappedMTokenImplementation_ The address of the would-be Wrapped M Token implementation.
11366 * @return wrappedMTokenProxy_ The address of the would-be Wrapped M Token proxy.
11467 */
11568 function mockDeploy (
11669 address deployer_ ,
11770 uint256 deployerNonce_
118- )
119- public
120- view
121- virtual
122- returns (
123- address earnerManagerImplementation_ ,
124- address earnerManagerProxy_ ,
125- address wrappedMTokenImplementation_ ,
126- address wrappedMTokenProxy_
127- )
128- {
129- // Earner Manager Implementation constructor needs only known values.
130- // Earner Manager Proxy constructor needs `earnerManagerImplementation_`.
131- // Wrapped M Token Implementation constructor needs `earnerManagerProxy_`.
132- // Wrapped M Token Proxy constructor needs `wrappedMTokenImplementation_`.
133-
134- earnerManagerImplementation_ = ContractHelper.getContractFrom (deployer_, deployerNonce_);
135- earnerManagerProxy_ = ContractHelper.getContractFrom (deployer_, deployerNonce_ + 1 );
136- wrappedMTokenImplementation_ = ContractHelper.getContractFrom (deployer_, deployerNonce_ + 2 );
137- wrappedMTokenProxy_ = ContractHelper.getContractFrom (deployer_, deployerNonce_ + 3 );
71+ ) public view virtual returns (address wrappedMTokenImplementation_ , address wrappedMTokenProxy_ ) {
72+ wrappedMTokenImplementation_ = ContractHelper.getContractFrom (deployer_, deployerNonce_);
73+ wrappedMTokenProxy_ = ContractHelper.getContractFrom (deployer_, deployerNonce_ + 1 );
13874 }
13975
14076 /**
14177 * @dev Mock deploys Wrapped M Token, returning the would-be addresses.
14278 * @param deployer_ The address of the deployer.
14379 * @param deployerNonce_ The nonce of the deployer.
144- * @return earnerManagerImplementation_ The address of the would-be Earner Manager implementation.
145- * @return earnerManagerProxy_ The address of the would-be Earner Manager proxy.
14680 * @return wrappedMTokenImplementation_ The address of the would-be Wrapped M Token implementation.
14781 * @return wrappedMTokenMigrator_ The address of the deployed Wrapped M Token Migrator.
14882 */
14983 function mockDeployUpgrade (
15084 address deployer_ ,
15185 uint256 deployerNonce_
152- )
153- public
154- view
155- virtual
156- returns (
157- address earnerManagerImplementation_ ,
158- address earnerManagerProxy_ ,
159- address wrappedMTokenImplementation_ ,
160- address wrappedMTokenMigrator_
161- )
162- {
163- // Earner Manager Implementation constructor needs only known values.
164- // Earner Manager Proxy constructor needs `earnerManagerImplementation_`.
165- // Wrapped M Token Implementation constructor needs `earnerManagerProxy_`.
166- // Migrator needs `wrappedMTokenImplementation_` addresses.
167-
168- earnerManagerImplementation_ = ContractHelper.getContractFrom (deployer_, deployerNonce_);
169- earnerManagerProxy_ = ContractHelper.getContractFrom (deployer_, deployerNonce_ + 1 );
170- wrappedMTokenImplementation_ = ContractHelper.getContractFrom (deployer_, deployerNonce_ + 2 );
171- wrappedMTokenMigrator_ = ContractHelper.getContractFrom (deployer_, deployerNonce_ + 3 );
86+ ) public view virtual returns (address wrappedMTokenImplementation_ , address wrappedMTokenMigrator_ ) {
87+ wrappedMTokenImplementation_ = ContractHelper.getContractFrom (deployer_, deployerNonce_);
88+ wrappedMTokenMigrator_ = ContractHelper.getContractFrom (deployer_, deployerNonce_ + 1 );
17289 }
17390}
0 commit comments