-
Notifications
You must be signed in to change notification settings - Fork 102
feat: Add FeeSharesMinter contract
#1216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
CheyenneAtapour
wants to merge
32
commits into
main
Choose a base branch
from
feat/fee-minter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 30 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
75e9f55
feat: Simple contract to mint fee shares
CheyenneAtapour 9ec1d11
chore: Cleanup
CheyenneAtapour 4dc1448
feat: Make contract usable with all hubs
CheyenneAtapour 0f6dab4
fix: Pr comments
CheyenneAtapour 4f0492e
fix: test comment
CheyenneAtapour d9bfd8d
fix: Address pr comments
CheyenneAtapour cf0e864
Merge remote-tracking branch 'origin/main' into feat/fee-minter
CheyenneAtapour ba91946
fix: address pr comments
CheyenneAtapour 729a05f
feat: Integrate with chainlink automation
CheyenneAtapour 89d75b4
fix: test suite
CheyenneAtapour 521c61c
chore: cleanup
CheyenneAtapour 3a54457
fix: Cleanup natspec
CheyenneAtapour 05bcd6c
fix: typo
CheyenneAtapour aba7d8c
Merge remote-tracking branch 'origin/main' into feat/fee-minter
CheyenneAtapour 55f3330
Merge remote-tracking branch 'origin/main' into feat/fee-minter
CheyenneAtapour 60d2395
Merge remote-tracking branch 'origin/main' into feat/fee-minter
CheyenneAtapour 01fc11f
merge in main
CheyenneAtapour d6c0ac0
fix: Address pr comments
CheyenneAtapour 9a0ce16
fix: Address pr comments
CheyenneAtapour 36d151c
fix: Some pr comments
CheyenneAtapour 976361e
Merge remote-tracking branch 'origin/main' into feat/fee-minter
CheyenneAtapour e0244e0
merge in main
CheyenneAtapour 6e155aa
fix: Remaining pr comments
CheyenneAtapour 39c7c5a
feat: Remove time component from fee minter
CheyenneAtapour 56fbaf0
fix: Remove extraneous functions
CheyenneAtapour 7bb20ec
fix : address pr comments & cleanup
Kogaroshi 55f1f82
fix : renaming
Kogaroshi c0c322d
feat : add FeeSharesMinter to deploy engine
Kogaroshi 8bb19cc
fix: address fee minter comments (#1299)
yan-man 98c4cc4
fix: address comments
avniculae c85cb6f
feat: migrate FeeSharesMinter to CRE
avniculae 9010c1f
feat: add FeeSharesMinter support in config engine
avniculae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/dependencies/chainlink/AutomationCompatibleInterface.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| // Imported from https://github.com/smartcontractkit/chainlink/blob/v2.22.0/contracts/src/v0.8/automation/interfaces/AutomationCompatibleInterface.sol | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| // solhint-disable-next-line interface-starts-with-i | ||
| interface AutomationCompatibleInterface { | ||
| /** | ||
| * @notice method that is simulated by the keepers to see if any work actually | ||
| * needs to be performed. This method does does not actually need to be | ||
|
CheyenneAtapour marked this conversation as resolved.
Outdated
|
||
| * executable, and since it is only ever simulated it can consume lots of gas. | ||
| * @dev To ensure that it is never called, you may want to add the | ||
| * cannotExecute modifier from KeeperBase to your implementation of this | ||
| * method. | ||
| * @param checkData specified in the upkeep registration so it is always the | ||
| * same for a registered upkeep. This can easily be broken down into specific | ||
| * arguments using `abi.decode`, so multiple upkeeps can be registered on the | ||
| * same contract and easily differentiated by the contract. | ||
| * @return upkeepNeeded boolean to indicate whether the keeper should call | ||
| * performUpkeep or not. | ||
| * @return performData bytes that the keeper should call performUpkeep with, if | ||
| * upkeep is needed. If you would like to encode data to decode later, try | ||
| * `abi.encode`. | ||
| */ | ||
| function checkUpkeep( | ||
| bytes calldata checkData | ||
| ) external returns (bool upkeepNeeded, bytes memory performData); | ||
|
|
||
| /** | ||
| * @notice method that is actually executed by the keepers, via the registry. | ||
| * The data returned by the checkUpkeep simulation will be passed into | ||
| * this method to actually be executed. | ||
| * @dev The input to this method should not be trusted, and the caller of the | ||
| * method should not even be restricted to any single registry. Anyone should | ||
| * be able call it, and the input should be validated, there is no guarantee | ||
| * that the data passed in is the performData returned from checkUpkeep. This | ||
| * could happen due to malicious keepers, racing keepers, or simply a state | ||
| * change while the performUpkeep transaction is waiting for confirmation. | ||
| * Always validate the data passed in. | ||
| * @param performData is the data which was passed back from the checkData | ||
| * simulation. If it is encoded, it can easily be decoded into other types by | ||
| * calling `abi.decode`. This data should not be trusted, and should be | ||
| * validated against the contract's current state. | ||
| */ | ||
| function performUpkeep( | ||
| bytes calldata performData | ||
| ) external; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // SPDX-License-Identifier: LicenseRef-BUSL | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| import {BatchReports} from 'src/deployments/libraries/BatchReports.sol'; | ||
| import {AaveV4FeeSharesMinterDeployProcedure} from 'src/deployments/procedures/deploy/utils/AaveV4FeeSharesMinterDeployProcedure.sol'; | ||
|
|
||
| /// @title AaveV4FeeSharesMinterBatch | ||
| /// @author Aave Labs | ||
| /// @notice Deploys the FeeSharesMinter contract, producing a batch report. | ||
| contract AaveV4FeeSharesMinterBatch is AaveV4FeeSharesMinterDeployProcedure { | ||
| BatchReports.FeeSharesMinterBatchReport internal _report; | ||
|
|
||
| /// @dev Constructor. | ||
| /// @param owner_ The owner of the FeeSharesMinter. | ||
| /// @param salt_ The CREATE2 salt for deterministic deployment. | ||
| constructor(address owner_, bytes32 salt_) { | ||
| address feeSharesMinter = _deployFeeSharesMinter({owner: owner_, salt: salt_}); | ||
| _report = BatchReports.FeeSharesMinterBatchReport({feeSharesMinter: feeSharesMinter}); | ||
| } | ||
|
|
||
| /// @notice Returns the batch deployment report. | ||
| function getReport() external view returns (BatchReports.FeeSharesMinterBatchReport memory) { | ||
| return _report; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/deployments/procedures/deploy/utils/AaveV4FeeSharesMinterDeployProcedure.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| // SPDX-License-Identifier: LicenseRef-BUSL | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| import {AaveV4DeployProcedureBase} from 'src/deployments/procedures/AaveV4DeployProcedureBase.sol'; | ||
| import {Create2Utils} from 'src/deployments/utils/libraries/Create2Utils.sol'; | ||
| import {FeeSharesMinter} from 'src/utils/FeeSharesMinter.sol'; | ||
|
|
||
| /// @title AaveV4FeeSharesMinterDeployProcedure | ||
| /// @author Aave Labs | ||
| /// @notice Deploys the FeeSharesMinter contract. | ||
| contract AaveV4FeeSharesMinterDeployProcedure is AaveV4DeployProcedureBase { | ||
| /// @notice Deploys a new FeeSharesMinter instance via CREATE2. | ||
| /// @param owner The owner of the FeeSharesMinter. | ||
| /// @param salt The CREATE2 salt for deterministic deployment. | ||
| /// @return The address of the deployed FeeSharesMinter contract. | ||
| function _deployFeeSharesMinter(address owner, bytes32 salt) internal returns (address) { | ||
| require(owner != address(0), 'invalid owner'); | ||
| return | ||
| Create2Utils.create2Deploy({ | ||
| salt: salt, | ||
| bytecode: abi.encodePacked(type(FeeSharesMinter).creationCode, abi.encode(owner)) | ||
| }); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.