-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
192 additions
and
14 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
mainnet-contracts/script/AccessManagerMigrations/GenerateAccessManagerCalldata2.s.sol
This file contains 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,38 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity >=0.8.0 <0.9.0; | ||
|
||
import { Script } from "forge-std/Script.sol"; | ||
import { AccessManager } from "@openzeppelin/contracts/access/manager/AccessManager.sol"; | ||
import { Multicall } from "@openzeppelin/contracts/utils/Multicall.sol"; | ||
import { console } from "forge-std/console.sol"; | ||
import { ROLE_ID_DAO } from "../../script/Roles.sol"; | ||
import { PufferModuleManager } from "../../src/PufferModuleManager.sol"; | ||
|
||
/** | ||
* @title GenerateAccessManagerCalldata2 | ||
* @author Puffer Finance | ||
* @notice Generates the AccessManager call data to setup the public access | ||
* The returned calldata is queued and executed by the Operations Multisig | ||
* 1. timelock.queueTransaction(address(accessManager), encodedMulticall, 1) | ||
* 2. ... 7 days later ... | ||
* 3. timelock.executeTransaction(address(accessManager), encodedMulticall, 1) | ||
*/ | ||
contract GenerateAccessManagerCalldata2 is Script { | ||
function run(address moduleManager) public pure returns (bytes memory) { | ||
bytes[] memory calldatas = new bytes[](1); | ||
|
||
bytes4[] memory daoSelectors = new bytes4[](1); | ||
daoSelectors[0] = PufferModuleManager.callSetClaimerFor.selector; | ||
|
||
calldatas[0] = abi.encodeWithSelector( | ||
AccessManager.setTargetFunctionRole.selector, moduleManager, daoSelectors, ROLE_ID_DAO | ||
); | ||
|
||
bytes memory encodedMulticall = abi.encodeCall(Multicall.multicall, (calldatas)); | ||
|
||
// console.log("GenerateAccessManagerCallData:"); | ||
// console.logBytes(encodedMulticall); | ||
|
||
return encodedMulticall; | ||
} | ||
} |
This file contains 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 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 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 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 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 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 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 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 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
20 changes: 20 additions & 0 deletions
20
mainnet-contracts/src/interface/EigenLayer/IRewardsCoordinator.sol
This file contains 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,20 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity >=0.5.0; | ||
|
||
/** | ||
* @title RewardsCoordinator | ||
* @author Eigen Labs Inc. | ||
* @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service | ||
* @notice This is the contract for rewards in EigenLayer. The main functionalities of this contract are | ||
* - enabling any ERC20 rewards from AVSs to their operators and stakers for a given time range | ||
* - allowing stakers and operators to claim their earnings including a commission bips for operators | ||
* - allowing the protocol to provide ERC20 tokens to stakers over a specified time range | ||
*/ | ||
interface IRewardsCoordinator { | ||
/** | ||
* @notice Sets the address of the entity that can call `processClaim` on behalf of the earner (msg.sender) | ||
* @param claimer The address of the entity that can call `processClaim` on behalf of the earner | ||
* @dev Only callable by the `earner` | ||
*/ | ||
function setClaimerFor(address claimer) external; | ||
} |
This file contains 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 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 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.