Skip to content

Commit 69061c6

Browse files
committed
feat: add dust bin to deploy script
1 parent e8f6699 commit 69061c6

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.0;
3+
4+
/**
5+
* @notice This contract is an intentionally empty implementation.
6+
* It's to be used for proxies that should be initialized with zero functionality.
7+
*/
8+
contract EmptyImplementation {
9+
10+
}

src/deployments/contracts/procedures/AaveV3TreasuryProcedure.sol

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ pragma solidity ^0.8.0;
33

44
import {TransparentUpgradeableProxy} from 'openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol';
55
import {Collector} from '../../../contracts/treasury/Collector.sol';
6+
import {EmptyImplementation} from '../../../contracts/misc/EmptyImplementation.sol';
67
import '../../interfaces/IMarketReportTypes.sol';
78

89
contract AaveV3TreasuryProcedure {
910
struct TreasuryReport {
1011
address treasuryImplementation;
1112
address treasury;
13+
address emptyImplementation;
14+
address dustBin;
1215
}
1316

1417
function _deployAaveV3Treasury(
@@ -29,6 +32,14 @@ contract AaveV3TreasuryProcedure {
2932
abi.encodeWithSelector(treasuryImplementation.initialize.selector, 100_000, poolAdmin)
3033
)
3134
);
35+
treasuryReport.emptyImplementation = address(new EmptyImplementation{salt: salt}());
36+
treasuryReport.dustBin = address(
37+
new TransparentUpgradeableProxy{salt: salt}(
38+
treasuryReport.emptyImplementation,
39+
poolAdmin,
40+
''
41+
)
42+
);
3243
} else {
3344
Collector treasuryImplementation = new Collector();
3445
treasuryReport.treasuryImplementation = address(treasuryImplementation);
@@ -40,6 +51,10 @@ contract AaveV3TreasuryProcedure {
4051
abi.encodeWithSelector(treasuryImplementation.initialize.selector, 100_000, poolAdmin)
4152
)
4253
);
54+
treasuryReport.emptyImplementation = address(new EmptyImplementation());
55+
treasuryReport.dustBin = address(
56+
new TransparentUpgradeableProxy(treasuryReport.emptyImplementation, poolAdmin, '')
57+
);
4358
}
4459

4560
return treasuryReport;

src/deployments/interfaces/IMarketReportTypes.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ struct PeripheryReport {
173173
address emissionManager;
174174
address rewardsControllerImplementation;
175175
address revenueSplitter;
176+
address emptyImplementation;
177+
address dustBin;
176178
}
177179

178180
struct ParaswapReport {

src/deployments/projects/aave-v3-batched/batches/AaveV3PeripheryBatch.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ contract AaveV3PeripheryBatch is
3030

3131
_report.treasury = treasuryReport.treasury;
3232
_report.treasuryImplementation = treasuryReport.treasuryImplementation;
33+
// bin and treasury are shared per network, so skipping based on treasury not being zero is fine
34+
_report.dustBin = treasuryReport.dustBin;
35+
_report.emptyImplementation = treasuryReport.emptyImplementation;
3336
} else {
3437
_report.treasury = config.treasury;
3538
}

0 commit comments

Comments
 (0)