-
Notifications
You must be signed in to change notification settings - Fork 94
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
fix: Rewards v2 audit fixes #346
Merged
Merged
Conversation
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
stevennevins
approved these changes
Jan 3, 2025
nadir-akhtar
approved these changes
Jan 3, 2025
daring5920
added a commit
to 0xJomo/eigenlayer-middleware-fork
that referenced
this pull request
Jan 6, 2025
* perf: refactor to modifers to use internal functions (Layr-Labs#272) * perf: refactor index registry to use internal functions for modifier (Layr-Labs#269) * fix: deprecated struct field for earning receiver * perf: move modifier logic to internal function * perf: refactor apk modifiers to use internal functions (Layr-Labs#268) * fix: deprecated struct field for earning receiver * perf: move modifier logic to internal function * perf: refactor modifiers to use internal functions for stake registry (Layr-Labs#266) * fix: deprecated struct field for earning receiver * refactor: require statements to internal functions * test: update revert reason strings * fix: storage layout (Layr-Labs#275) updated inheritance to allow the EigenDAServiceManager to maintain its current storage layout * feat: reward initiator for ECDSAServiceManagerBase (Layr-Labs#274) * feat: reward initiator for ECDSAServiceManagerBase * fix: update gap * feat: changes to onlyRewardsInitiator modifier * fix: error code * fix: comment typos in IServiceManagerUI (Layr-Labs#278) * fix: correct index get operator restakable strategies (Layr-Labs#280) * fix: add unit tests for ECDSAServiceManager and fix index in getOperatorRestakableStrategies * chore: formatter * chore: formatter * chore: update dev to eigenlayer contracts dev (Layr-Labs#282) * chore: update to latest eigenlayer-contracts dev * fix: update mocks * fix: increase gas limit * fix: overflow (Layr-Labs#290) * feat: mainnet rewards release tag (Layr-Labs#297) * build: update core submodule to new release (Layr-Labs#298) * build: update core submodule to new release * fix: flakey tests from pepe upgrade * add overrides (Layr-Labs#302) Co-authored-by: steven <[email protected]> * onchain socket (Layr-Labs#307) * feat: onchain socket moves sockets onchain to SM * feat: socket registry - move storage to new registry - leave event in RegCoord - trim bytecode from error strings * fix: internal function internal function to update socket * chore: bump dependency with core to v0.4.3-mainnet-rewards-programmatic-incentives (Layr-Labs#314) * chore: bump core dep * fix: intefface changes from dependency bump * test: vm.skip stale stake case * feat: ejection policy change (Layr-Labs#313) * feat: ejection stake capping * fix: behavior * feat: Rewards v2 (Layr-Labs#315) * chore: bump up eigenlayer contracts dependency * feat: createAVSPerformanceRewardsSubmission in AVSServiceManager * feat: setClaimerFor * feat: updated IServiceManager * fix: onlyOwner for setClaimerFor * refactor: commission to split terminology * test: not owner * test: erc20 not approved * test: single submission * test: multiple submissions * test: setClaimer * chore: updated events * chore: updated submodules * ejector fix (Layr-Labs#322) * fix: ejector * fix: ejector * fix: nit * fix: for real this time * test: fix * fix: ejector owner (Layr-Labs#326) * test: socket registry (Layr-Labs#327) * docs: fix typos and add note that large array may cause revert (Layr-Labs#323) * fix: Rewards v2 audit fixes (Layr-Labs#346) * fix: using SafeERC20 * docs: comment --------- Co-authored-by: steven <[email protected]> Co-authored-by: quaq <[email protected]> Co-authored-by: Gajesh Naik <[email protected]> Co-authored-by: Samuel Laferriere <[email protected]> Co-authored-by: Madhur Shrimal <[email protected]> Co-authored-by: Michael Sun <[email protected]> Co-authored-by: Gautham Anant <[email protected]> Co-authored-by: Rajath Alex <[email protected]> Co-authored-by: Nadir Akhtar <[email protected]>
daring5920
added a commit
to 0xJomo/eigenlayer-middleware-fork
that referenced
this pull request
Jan 6, 2025
* perf: refactor to modifers to use internal functions (Layr-Labs#272) * perf: refactor index registry to use internal functions for modifier (Layr-Labs#269) * fix: deprecated struct field for earning receiver * perf: move modifier logic to internal function * perf: refactor apk modifiers to use internal functions (Layr-Labs#268) * fix: deprecated struct field for earning receiver * perf: move modifier logic to internal function * perf: refactor modifiers to use internal functions for stake registry (Layr-Labs#266) * fix: deprecated struct field for earning receiver * refactor: require statements to internal functions * test: update revert reason strings * fix: storage layout (Layr-Labs#275) updated inheritance to allow the EigenDAServiceManager to maintain its current storage layout * feat: reward initiator for ECDSAServiceManagerBase (Layr-Labs#274) * feat: reward initiator for ECDSAServiceManagerBase * fix: update gap * feat: changes to onlyRewardsInitiator modifier * fix: error code * fix: comment typos in IServiceManagerUI (Layr-Labs#278) * fix: correct index get operator restakable strategies (Layr-Labs#280) * fix: add unit tests for ECDSAServiceManager and fix index in getOperatorRestakableStrategies * chore: formatter * chore: formatter * chore: update dev to eigenlayer contracts dev (Layr-Labs#282) * chore: update to latest eigenlayer-contracts dev * fix: update mocks * fix: increase gas limit * fix: overflow (Layr-Labs#290) * feat: mainnet rewards release tag (Layr-Labs#297) * build: update core submodule to new release (Layr-Labs#298) * build: update core submodule to new release * fix: flakey tests from pepe upgrade * add overrides (Layr-Labs#302) Co-authored-by: steven <[email protected]> * onchain socket (Layr-Labs#307) * feat: onchain socket moves sockets onchain to SM * feat: socket registry - move storage to new registry - leave event in RegCoord - trim bytecode from error strings * fix: internal function internal function to update socket * chore: bump dependency with core to v0.4.3-mainnet-rewards-programmatic-incentives (Layr-Labs#314) * chore: bump core dep * fix: intefface changes from dependency bump * test: vm.skip stale stake case * feat: ejection policy change (Layr-Labs#313) * feat: ejection stake capping * fix: behavior * feat: Rewards v2 (Layr-Labs#315) * chore: bump up eigenlayer contracts dependency * feat: createAVSPerformanceRewardsSubmission in AVSServiceManager * feat: setClaimerFor * feat: updated IServiceManager * fix: onlyOwner for setClaimerFor * refactor: commission to split terminology * test: not owner * test: erc20 not approved * test: single submission * test: multiple submissions * test: setClaimer * chore: updated events * chore: updated submodules * ejector fix (Layr-Labs#322) * fix: ejector * fix: ejector * fix: nit * fix: for real this time * test: fix * fix: ejector owner (Layr-Labs#326) * test: socket registry (Layr-Labs#327) * docs: fix typos and add note that large array may cause revert (Layr-Labs#323) * fix: Rewards v2 audit fixes (Layr-Labs#346) * fix: using SafeERC20 * docs: comment --------- Co-authored-by: steven <[email protected]> Co-authored-by: quaq <[email protected]> Co-authored-by: Gajesh Naik <[email protected]> Co-authored-by: Samuel Laferriere <[email protected]> Co-authored-by: Madhur Shrimal <[email protected]> Co-authored-by: Michael Sun <[email protected]> Co-authored-by: Gautham Anant <[email protected]> Co-authored-by: Rajath Alex <[email protected]> Co-authored-by: Nadir Akhtar <[email protected]>
daring5920
added a commit
to 0xJomo/eigenlayer-middleware-fork
that referenced
this pull request
Jan 6, 2025
* perf: refactor to modifers to use internal functions (Layr-Labs#272) * perf: refactor index registry to use internal functions for modifier (Layr-Labs#269) * fix: deprecated struct field for earning receiver * perf: move modifier logic to internal function * perf: refactor apk modifiers to use internal functions (Layr-Labs#268) * fix: deprecated struct field for earning receiver * perf: move modifier logic to internal function * perf: refactor modifiers to use internal functions for stake registry (Layr-Labs#266) * fix: deprecated struct field for earning receiver * refactor: require statements to internal functions * test: update revert reason strings * fix: storage layout (Layr-Labs#275) updated inheritance to allow the EigenDAServiceManager to maintain its current storage layout * feat: reward initiator for ECDSAServiceManagerBase (Layr-Labs#274) * feat: reward initiator for ECDSAServiceManagerBase * fix: update gap * feat: changes to onlyRewardsInitiator modifier * fix: error code * fix: comment typos in IServiceManagerUI (Layr-Labs#278) * fix: correct index get operator restakable strategies (Layr-Labs#280) * fix: add unit tests for ECDSAServiceManager and fix index in getOperatorRestakableStrategies * chore: formatter * chore: formatter * chore: update dev to eigenlayer contracts dev (Layr-Labs#282) * chore: update to latest eigenlayer-contracts dev * fix: update mocks * fix: increase gas limit * fix: overflow (Layr-Labs#290) * feat: mainnet rewards release tag (Layr-Labs#297) * build: update core submodule to new release (Layr-Labs#298) * build: update core submodule to new release * fix: flakey tests from pepe upgrade * add overrides (Layr-Labs#302) Co-authored-by: steven <[email protected]> * onchain socket (Layr-Labs#307) * feat: onchain socket moves sockets onchain to SM * feat: socket registry - move storage to new registry - leave event in RegCoord - trim bytecode from error strings * fix: internal function internal function to update socket * chore: bump dependency with core to v0.4.3-mainnet-rewards-programmatic-incentives (Layr-Labs#314) * chore: bump core dep * fix: intefface changes from dependency bump * test: vm.skip stale stake case * feat: ejection policy change (Layr-Labs#313) * feat: ejection stake capping * fix: behavior * feat: Rewards v2 (Layr-Labs#315) * chore: bump up eigenlayer contracts dependency * feat: createAVSPerformanceRewardsSubmission in AVSServiceManager * feat: setClaimerFor * feat: updated IServiceManager * fix: onlyOwner for setClaimerFor * refactor: commission to split terminology * test: not owner * test: erc20 not approved * test: single submission * test: multiple submissions * test: setClaimer * chore: updated events * chore: updated submodules * ejector fix (Layr-Labs#322) * fix: ejector * fix: ejector * fix: nit * fix: for real this time * test: fix * fix: ejector owner (Layr-Labs#326) * test: socket registry (Layr-Labs#327) * docs: fix typos and add note that large array may cause revert (Layr-Labs#323) * fix: Rewards v2 audit fixes (Layr-Labs#346) * fix: using SafeERC20 * docs: comment --------- Co-authored-by: steven <[email protected]> Co-authored-by: quaq <[email protected]> Co-authored-by: Gajesh Naik <[email protected]> Co-authored-by: Samuel Laferriere <[email protected]> Co-authored-by: Madhur Shrimal <[email protected]> Co-authored-by: Michael Sun <[email protected]> Co-authored-by: Gautham Anant <[email protected]> Co-authored-by: Rajath Alex <[email protected]> Co-authored-by: Nadir Akhtar <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
As part of the Rewards v2 SigmaPrime audit, we need to tackle issue
ELSC2-05: Missing SafeERC20 Usage For Token Interactions
Modifications
safeTransferFrom
instead oftransferFrom
safeIncreaseAllowance
instead ofapprove
(allowance + value)Result
Rewards v2 audit fixes.