-
Notifications
You must be signed in to change notification settings - Fork 31
AVS Rewards #24
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
base: main
Are you sure you want to change the base?
AVS Rewards #24
Changes from 26 commits
742c262
8f42137
0cbf910
e68fabe
71f596e
658eee4
ebb34d8
9eb92e1
1c0c490
723df82
3635241
3454c58
6a0a5f7
b8d5d82
0ea893b
d067439
a4862cd
58286b8
183fe15
f057a72
e78657a
7dee830
c7ddf6e
afeeaac
9487d87
8f658eb
e0418e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,4 +14,5 @@ ngrok.yml | |
| src/test.ts | ||
| .env.* | ||
| .cache | ||
| envs | ||
| envs | ||
| avs/contracts/mockData/payments.json | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,9 @@ | ||
| [submodule "avs/contracts/lib/forge-std"] | ||
| path = avs/contracts/lib/forge-std | ||
| url = https://github.com/foundry-rs/forge-std | ||
| branch = v1.8.2 | ||
| [submodule "avs/contracts/lib/openzeppelin-contracts"] | ||
| path = avs/contracts/lib/openzeppelin-contracts | ||
| url = https://github.com/OpenZeppelin/openzeppelin-contracts | ||
| branch = v4.7.3 | ||
| [submodule "avs/contracts/lib/eigenlayer-middleware"] | ||
| path = avs/contracts/lib/eigenlayer-middleware | ||
| url = https://github.com/layr-Labs/eigenlayer-middleware | ||
| branch = v0.2.0-rc1-holesky-preprod-payments |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [submodule "lib/openzeppelin-contracts-upgradeable"] | ||
| path = lib/openzeppelin-contracts-upgradeable | ||
| url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| { | ||
| "strategyManager": { | ||
| "init_paused_status": 0, | ||
| "initial_owner": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", | ||
| "initial_strategy_whitelister": "0x959922be3caee4b8cd9a407cc3ac1c251c2007b1", | ||
| "init_withdrawal_delay_blocks": 1 | ||
| }, | ||
| "delegationManager": { | ||
| "init_paused_status": 0, | ||
| "init_withdrawal_delay_blocks": 1, | ||
| "initial_owner": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", | ||
| "min_withdrawal_delay_blocks": 50400 | ||
| }, | ||
| "eigenPodManager": { | ||
| "init_paused_status": 0, | ||
| "initial_owner": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" | ||
| }, | ||
| "allocationManager": { | ||
| "init_paused_status": 0, | ||
| "initial_owner": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", | ||
| "deallocation_delay": 0, | ||
| "allocation_configuration_delay": 0 | ||
| }, | ||
| "strategyFactory": { | ||
| "init_paused_status": 0, | ||
| "initial_owner": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" | ||
| }, | ||
| "avsDirectory": { | ||
| "init_paused_status": 0, | ||
| "initial_owner": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" | ||
| }, | ||
| "rewardsCoordinator": { | ||
| "init_paused_status": 0, | ||
| "initial_owner": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", | ||
| "rewards_updater": "0x14dC79964da2C08b23698B3D3cc7Ca32193d9955", | ||
| "activation_delay": 0, | ||
| "default_split_bips": 1000, | ||
| "calculation_interval_seconds": 86400, | ||
| "MAX_REWARDS_DURATION": 864000, | ||
| "MAX_RETROACTIVE_LENGTH": 432000, | ||
| "MAX_FUTURE_LENGTH": 86400, | ||
| "GENESIS_REWARDS_TIMESTAMP": 1672531200, | ||
| "global_operator_commission_bips": 1000 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "addresses": { | ||
| "rewardsOwner": "0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f", | ||
| "rewardsInitiator": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720" | ||
| }, | ||
| "keys": { | ||
| "rewardsOwner": "0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97", | ||
| "rewardsInitiator": "0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "num_quorums": 1, | ||
| "operator_params": [10000,15000,100], | ||
| "operator_addr": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", | ||
| "operator_2_addr":"0x0b065a0423f076a340f37e16e1ce22e23d66caf2", | ||
| "contracts_registry_addr": "0x5FbDB2315678afecb367f032d93F642f64180aa3", | ||
| "task_generator_addr": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", | ||
| "aggregator_addr":"0xa0Ee7A142d267C1f36714E4a8F75612F20a79720", | ||
| "rewards_owner_addr": "0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f", | ||
| "rewards_initiator_addr": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720", | ||
| "rewards_owner_key": "0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97", | ||
| "rewards_initiator_key": "0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6" | ||
| } | ||
|
Comment on lines
+1
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical security concern: Plaintext private keys in configuration file This configuration file contains private keys in plaintext (lines 11-12), which presents a significant security risk if committed to version control. Never store private keys in configuration files that might be committed to a repository. Instead:
{
"rewards_owner_key": "${REWARDS_OWNER_KEY}",
"rewards_initiator_key": "${REWARDS_INITIATOR_KEY}"
}
Also consider adding documentation comments explaining what each parameter represents, particularly the meaning of the numeric values in 🤖 Prompt for AI Agents |
||
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,33 @@ | ||||||||||||||||||||||||||
| // SPDX-License-Identifier: BUSL-1.1 | ||||||||||||||||||||||||||
| pragma solidity ^0.8.12; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| import {Script} from "forge-std/Script.sol"; | ||||||||||||||||||||||||||
| import {console2} from "forge-std/console2.sol"; | ||||||||||||||||||||||||||
| import {CoreDeploymentLib} from "./utils/CoreDeploymentLib.sol"; | ||||||||||||||||||||||||||
| import {UpgradeableProxyLib} from "./utils/UpgradeableProxyLib.sol"; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| contract DeployEigenlayerCore is Script { | ||||||||||||||||||||||||||
| using CoreDeploymentLib for *; | ||||||||||||||||||||||||||
| using UpgradeableProxyLib for address; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| address internal deployer; | ||||||||||||||||||||||||||
| address internal proxyAdmin; | ||||||||||||||||||||||||||
| CoreDeploymentLib.DeploymentData internal deploymentData; | ||||||||||||||||||||||||||
| CoreDeploymentLib.DeploymentConfigData internal configData; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| function setUp() public virtual { | ||||||||||||||||||||||||||
| deployer = vm.rememberKey(vm.envUint("PRIVATE_KEY")); | ||||||||||||||||||||||||||
| vm.label(deployer, "Deployer"); | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| function setUp() public virtual { | |
| deployer = vm.rememberKey(vm.envUint("PRIVATE_KEY")); | |
| vm.label(deployer, "Deployer"); | |
| } | |
| function setUp() public virtual { | |
| // Check if PRIVATE_KEY is set | |
| string memory privateKeyStr = vm.envOr("PRIVATE_KEY", string("")); | |
| require(bytes(privateKeyStr).length > 0, "PRIVATE_KEY environment variable not set"); | |
| deployer = vm.rememberKey(vm.envUint("PRIVATE_KEY")); | |
| vm.label(deployer, "Deployer"); | |
| } |
🤖 Prompt for AI Agents
In avs/contracts/script/DeployEigenLayerCore.s.sol around lines 18 to 21, the
setUp function uses vm.envUint("PRIVATE_KEY") without checking if the
environment variable is set, which can cause unclear failures. Add validation to
check if the PRIVATE_KEY environment variable is present before using it, and if
missing, revert or throw an error with a clear message indicating that the
PRIVATE_KEY environment variable is required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove and Secure Private Keys
Committing private keys directly in a repository poses a significant security risk. Move these keys to a secure vault or load them via environment variables at runtime, and update scripts to reference non-committed secrets.
🤖 Prompt for AI Agents