Skip to content

Commit

Permalink
Merge branch 'dev' into feat/uniprint
Browse files Browse the repository at this point in the history
  • Loading branch information
0xClandestine authored Sep 16, 2024
2 parents 9523d48 + 4e9b422 commit f35aedf
Show file tree
Hide file tree
Showing 30 changed files with 1,368 additions and 211 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/deploy-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Run Local Build

on:
push:
workflow_dispatch: {}

jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

steps:
- name: Checkout code
uses: actions/checkout@v2

run-local-build:
needs: prepare
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install lcov
run: |
sudo apt-get install lcov
id: lcov
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run forge install
run: forge install
- name: Start anvil and deploy
run: |
anvil --block-time 1 --chain-id 31337 &
ANVIL_PID=$!
echo "---Waiting for anvil to start..."
sleep 10 # Give Anvil some time to start
export RPC_URL="http://127.0.0.1:8545"
echo "Extracted PRIVATE_KEY: $PRIVATE_KEY"
echo "---Deploying Contracts"
RUST_LOG=forge,foundry=trace forge script script/deploy/local/Deploy_From_Scratch.s.sol \
--rpc-url $RPC_URL \
--private-key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" \
--broadcast \
--sig "run(string memory configFile)" \
-- local/deploy_from_scratch.anvil.config.json
kill $ANVIL_PID
38 changes: 0 additions & 38 deletions .github/workflows/run-deploy-scripts.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ config.json
contract.addresses
deployedAddresses

script/output/eigenpods.json

#Hardhat files
cache_hardhat
artifacts
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ The current mainnet deployment is our M2 release. You can view the deployed cont
| -------- | -------- | -------- | -------- |
| [`DelegationManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/4b15d68b7e16b5965bad398496bfce57f5a47e1b/src/contracts/core/DelegationManager.sol) | [`0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A`](https://etherscan.io/address/0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A) | [`0x1784...9dda`](https://etherscan.io/address/0x1784be6401339fc0fedf7e9379409f5c1bfe9dda) | Proxy: [`[email protected]`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) |
| [`StrategyManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/4b15d68b7e16b5965bad398496bfce57f5a47e1b/src/contracts/core/StrategyManager.sol) | [`0x858646372CC42E1A627fcE94aa7A7033e7CF075A`](https://etherscan.io/address/0x858646372CC42E1A627fcE94aa7A7033e7CF075A) | [`0x70f4...619b`](https://etherscan.io/address/0x70f44c13944d49a236e3cd7a94f48f5dab6c619b) | Proxy: [`[email protected]`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) |
| [`EigenPodManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/4b15d68b7e16b5965bad398496bfce57f5a47e1b/src/contracts/pods/EigenPodManager.sol) | [`0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338`](https://etherscan.io/address/0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338) | [`0x731A...3FEa`](https://etherscan.io/address/0x731A0aD160e407393Ff662231Add6Dd145AD3FEa) | Proxy: [`[email protected]`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) |
| [`EigenPodManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/bda003385c5fec59e35196dc14d01f17d1eb7001/src/contracts/pods/EigenPodManager.sol) | [`0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338`](https://etherscan.io/address/0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338) | [`0x731A...3FEa`](https://etherscan.io/address/0x731A0aD160e407393Ff662231Add6Dd145AD3FEa) | Proxy: [`[email protected]`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) |
| [`AVSDirectory`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/4b15d68b7e16b5965bad398496bfce57f5a47e1b/src/contracts/core/AVSDirectory.sol) | [`0x135dda560e946695d6f155dacafc6f1f25c1f5af`](https://etherscan.io/address/0x135dda560e946695d6f155dacafc6f1f25c1f5af) | [`0xdabd...a5b7`](https://etherscan.io/address/0xdabdb3cd346b7d5f5779b0b614ede1cc9dcba5b7) | Proxy: [`[email protected]`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) |
| [`Slasher`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/4b15d68b7e16b5965bad398496bfce57f5a47e1b/src/contracts/core/Slasher.sol) | [`0xD92145c07f8Ed1D392c1B88017934E301CC1c3Cd`](https://etherscan.io/address/0xD92145c07f8Ed1D392c1B88017934E301CC1c3Cd) | [`0xf323...6614`](https://etherscan.io/address/0xf3234220163a757edf1e11a8a085638d9b236614) | Proxy: [`[email protected]`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) |
| [`RewardsCoordinator`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/RewardsCoordinator.sol) | [`0x7750d328b314EfFa365A0402CcfD489B80B0adda`](https://etherscan.io/address/0x7750d328b314EfFa365A0402CcfD489B80B0adda) | [`0x5bf7...8785`](https://etherscan.io/address/0x5bf7c13D5FAdba224ECB3D5C0a67A231D1628785) | Proxy: [`[email protected]`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) |
Expand Down Expand Up @@ -158,7 +158,7 @@ The following strategies differ significantly from the other strategies deployed

| Name | Proxy | Implementation | Notes |
| -------- | -------- | -------- | -------- |
| [`EigenPod (beacon)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v0.2.5-mainnet-m2-minor-eigenpod-upgrade/src/contracts/pods/EigenPod.sol) | [`0x5a2a4F2F3C18f09179B6703e63D9eDD165909073`](https://etherscan.io/address/0x5a2a4F2F3C18f09179B6703e63D9eDD165909073) | [`0x6D22...6430`](https://etherscan.io/address/0x6D225e974Fa404D25Ffb84eD6E242Ffa18eF6430) | - Beacon: [`BeaconProxy`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/beacon/BeaconProxy.sol) <br />- Pods: [`UpgradeableBeacon`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/beacon/UpgradeableBeacon.sol) |
| [`EigenPod (beacon)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/bda003385c5fec59e35196dc14d01f17d1eb7001/src/contracts/pods/EigenPod.sol) | [`0x5a2a4F2F3C18f09179B6703e63D9eDD165909073`](https://etherscan.io/address/0x5a2a4F2F3C18f09179B6703e63D9eDD165909073) | [`0x6D22...6430`](https://etherscan.io/address/0x6D225e974Fa404D25Ffb84eD6E242Ffa18eF6430) | - Beacon: [`BeaconProxy`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/beacon/BeaconProxy.sol) <br />- Pods: [`UpgradeableBeacon`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/beacon/UpgradeableBeacon.sol) |
| [`DelayedWithdrawalRouter`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/4b15d68b7e16b5965bad398496bfce57f5a47e1b/src/contracts/pods/DelayedWithdrawalRouter.sol) | [`0x7Fe7E9CC0F274d2435AD5d56D5fa73E47F6A23D8`](https://etherscan.io/address/0x7Fe7E9CC0F274d2435AD5d56D5fa73E47F6A23D8) | [`0x4bb6...4226`](https://etherscan.io/address/0x4bb6731b02314d40abbffbc4540f508874014226) | Proxy: [`[email protected]`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) |

###### EIGEN/bEIGEN
Expand Down
Binary file modified audits/M4 Mainnet (PEPE) - Certora - Aug 2024.pdf
Binary file not shown.
27 changes: 26 additions & 1 deletion docs/core/RewardsCoordinator.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Rewards are initially submitted to the contract to be distributed to Operators a

* [`RewardsCoordinator.createAVSRewardsSubmission`](#createavsrewardssubmission)
* [`RewardsCoordinator.createRewardsForAllSubmission`](#createrewardsforallsubmission)
* [`RewardsCoordinator.createRewardsForAllEarners`](#createrewardsforallearners)

#### `createAVSRewardsSubmission`

Expand Down Expand Up @@ -153,7 +154,7 @@ function createRewardsForAllSubmission(

This method is identical in function to [`createAVSRewardsSubmission`](#createavsrewardssubmission) above, except:
* It can only be called by a whitelisted "rewards for all submitter"
* ALL Stakers/Operators are eligible for rewards, instead of those specifically registered for a given AVS
* ALL Stakers are eligible for rewards, instead of those specifically registered for a given AVS

*Effects*:
* See [`createAVSRewardsSubmission`](#createavsrewardssubmission) above. The only differences are that:
Expand All @@ -163,6 +164,30 @@ This method is identical in function to [`createAVSRewardsSubmission`](#createav
*Requirements*:
* See [`createAVSRewardsSubmission`](#createavsrewardssubmission) above. The only difference is that each calculated rewards submission hash MUST NOT already exist in the `isRewardsSubmissionForAllHash` mapping.

#### `createRewardsForAllEarners`

```solidity
function createRewardsForAllEarners(
RewardsSubmission[] calldata RewardsSubmissions
)
external
onlyWhenNotPaused(PAUSED_REWARDS_FOR_ALL_SUBMISSION)
onlyRewardsForAllSubmitter
nonReentrant
```

This method is identical in function to [`createAVSRewardsSubmission`](#createavsrewardssubmission) above, except:
* It can only be called by a whitelisted "rewards for all submitter"
* Only operators who have opted into at least one AVS and the operator's delegated stakers are eligible for rewards

*Effects*:
* See [`createAVSRewardsSubmission`](#createavsrewardssubmission) above. The only differences are that:
* Each rewards submission hash is stored in the `isRewardsSubmissionForAllEarnersHash` mapping
* Emits a `RewardsSubmissionForAllEarnersCreated` event

*Requirements*:
* See [`createAVSRewardsSubmission`](#createavsrewardssubmission) above. The only difference is that each calculated rewards submission hash MUST NOT already exist in the `isRewardsSubmissionForAllEarnersHash` mapping.

---

### Distributing and Claiming Rewards
Expand Down
186 changes: 185 additions & 1 deletion pkg/bindings/IRewardsCoordinator/binding.go

Large diffs are not rendered by default.

219 changes: 217 additions & 2 deletions pkg/bindings/RewardsCoordinator/binding.go

Large diffs are not rendered by default.

217 changes: 216 additions & 1 deletion pkg/bindings/RewardsCoordinatorStorage/binding.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions script/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
output/*
48 changes: 0 additions & 48 deletions script/configs/devnet/M1_deploy_devnet.config.json

This file was deleted.

44 changes: 0 additions & 44 deletions script/configs/devnet/M2_deploy_from_scratch.anvil.config.json

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"lastUpdated": "v0.4.2-preprod-longtail",
"addresses": {
"avsDirectory": "0x141d6995556135D4997b2ff72EB443Be300353bC",
"avsDirectoryImplementation": "0x357978adC03375BD6a3605DE055fABb84695d79A",
Expand All @@ -24,6 +25,10 @@
"strategyAddresses": [],
"strategyManager": "0xF9fbF2e35D8803273E214c99BF15174139f4E67a",
"strategyManagerImplementation": "0x1a26B23a004C512350d7Dd89056655A80b850199",
"strategyFactory": "0xad4A89E3cA9b3dc25AABe0aa7d72E61D2Ec66052",
"strategyFactoryImplementation": "0x7a9478c0AcB819d7c235FbE2a6E13ee1D2fCD862",
"strategyFactoryBeacon": "0xf2c2AcA859C685895E60ca7A14274365b64c0c2a",
"strategyFactoryBeaconImplementation": "0xd648792F932FbabcCC80Cd376812074434412685",
"token": {
"EIGEN": "0xD58f6844f79eB1fbd9f7091d05f7cb30d3363926",
"EIGENImpl": "0x95a7431400F362F3647a69535C5666cA0133CAA0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"lastUpdated": "v0.4.3-rewards-incentives",
"addresses": {
"avsDirectory": "0x055733000064333CaDDbC92763c58BF0192fFeBf",
"avsDirectoryImplementation": "0xEF5BA995Bc7722fd1e163edF8Dc09375de3d3e3a",
Expand All @@ -16,7 +17,7 @@
"eigenPodManagerImplementation": "0x91A6525a4a843F5a5B633905300c33F79413CCc5",
"emptyContract": "0x9690d52B1Ce155DB2ec5eCbF5a262ccCc7B3A6D2",
"rewardsCoordinator": "0xAcc1fb458a1317E886dB376Fc8141540537E68fE",
"rewardsCoordinatorImplementation": "0xe54625095656206AC1B42819875343453c447f97",
"rewardsCoordinatorImplementation": "0x1131D88143a35011E35263b43eC66cDd27025584",
"slasher": "0xcAe751b75833ef09627549868A04E32679386e7C",
"slasherImplementation": "0x99715D255E34a39bE9943b82F281CA734bcF345A",
"numStrategiesDeployed": 10,
Expand Down
1 change: 1 addition & 0 deletions script/configs/holesky/eigenlayer_preprod.config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"lastUpdated": "v0.4.2-preprod-longtail",
"chainInfo": {
"chainId": 17000
},
Expand Down
Loading

0 comments on commit f35aedf

Please sign in to comment.