Skip to content

Commit

Permalink
wip: update contracts for mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
merklefruit committed Jan 23, 2025
1 parent fe871a6 commit 8020995
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 5 deletions.
8 changes: 7 additions & 1 deletion bolt-cli/src/commands/operators/eigenlayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ mod tests {
use alloy_node_bindings::WEI_IN_ETHER;

#[tokio::test]
async fn test_eigenlayer_flow() {
async fn test_eigenlayer_flow_holesky() {
let _ = tracing_subscriber::fmt::try_init();
let s1 = PrivateKeySigner::random();
let secret_key = s1.to_bytes();
Expand Down Expand Up @@ -668,4 +668,10 @@ mod tests {

check_operator_registration.run().await.expect("to check operator registration");
}

#[tokio::test]
async fn test_eigenlayer_flow_mainnet() {
// TODO: do the same as above, but fork from mainnet instead
// and use the mainnet EigenLayer contracts
}
}
63 changes: 59 additions & 4 deletions bolt-cli/src/contracts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub struct Bolt {
pub manager: Address,
pub eigenlayer_middleware: Address,
pub symbiotic_middleware: Address,
pub operators_registry: Address,
}

#[derive(Clone, Serialize, Deserialize, Debug)]
Expand All @@ -38,7 +39,6 @@ pub struct Symbiotic {
pub vault_configurator: Address,
pub network_registry: Address,
pub network_middleware_service: Address,
pub middleware: Address,
pub supported_vaults: [Address; 6],
}

Expand All @@ -47,7 +47,6 @@ pub struct EigenLayer {
pub avs_directory: Address,
pub delegation_manager: Address,
pub strategy_manager: Address,
pub middleware: Address,
pub supported_strategies: EigenLayerStrategies,
}

Expand Down Expand Up @@ -100,6 +99,7 @@ pub fn strategy_to_address(
pub fn deployments() -> HashMap<Chain, Contracts> {
let mut deployments = HashMap::new();
deployments.insert(Chain::Holesky, HOLESKY_DEPLOYMENTS.clone());
deployments.insert(Chain::Mainnet, MAINNET_DEPLOYMENTS.clone());

deployments
}
Expand All @@ -119,6 +119,9 @@ lazy_static! {
manager: address!("440202829b493F9FF43E730EB5e8379EEa3678CF"),
eigenlayer_middleware: address!("a632a3e652110Bb2901D5cE390685E6a9838Ca04"),
symbiotic_middleware: address!("04f40d9CaE475E5BaA462acE53E5c58A0DD8D8e8"),

// TODO(nico): refactor this out
operators_registry: address!("0000000000000000000000000000000000000000"),
},
symbiotic: Symbiotic {
network: address!("b017002D8024d8c8870A5CECeFCc63887650D2a4"),
Expand All @@ -128,7 +131,6 @@ lazy_static! {
vault_configurator: address!("D2191FE92987171691d552C219b8caEf186eb9cA"),
network_registry: address!("7d03b7343BF8d5cEC7C0C27ecE084a20113D15C9"),
network_middleware_service: address!("62a1ddfD86b4c1636759d9286D3A0EC722D086e3"),
middleware: address!("04f40d9CaE475E5BaA462acE53E5c58A0DD8D8e8"),
supported_vaults: [
address!("c79c533a77691641d52ebD5e87E51dCbCaeb0D78"),
address!("e5708788c90e971f73D928b7c5A8FD09137010e0"),
Expand All @@ -142,7 +144,6 @@ lazy_static! {
avs_directory: address!("055733000064333CaDDbC92763c58BF0192fFeBf"),
delegation_manager: address!("A44151489861Fe9e3055d95adC98FbD462B948e7"),
strategy_manager: address!("dfB5f6CE42aAA7830E94ECFCcAd411beF4d4D5b6"),
middleware: address!("a632a3e652110Bb2901D5cE390685E6a9838Ca04"),
supported_strategies: EigenLayerStrategies {
st_eth: address!("7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3"),
r_eth: address!("3A8fBdf9e77DFc25d09741f51d3E181b25d0c4E0"),
Expand All @@ -160,4 +161,58 @@ lazy_static! {
("m_eth".to_string(), address!("e3C063B1BEe9de02eb28352b55D49D85514C67FF")),
],
};
pub static ref MAINNET_DEPLOYMENTS: Contracts = Contracts {
bolt: Bolt {
// TODO(nico): rm these which aren't part of the new deployment
validators: address!("0000000000000000000000000000000000000000"),
parameters: address!("0000000000000000000000000000000000000000"),
manager: address!("0000000000000000000000000000000000000000"),

// TODO(nico): change these to mainnet actual addresses
// these point to our Anvil fork for now
operators_registry: address!("Ed8D7d3A98CB4ea6C91a80dcd2220719c264531f"),
eigenlayer_middleware: address!("2ca60d89144D4cdf85dA87af4FE12aBF9265F28C"),
symbiotic_middleware: address!("fD3e0cEe740271f070607aEddd0Bf4Cf99C92204"),
},
symbiotic: Symbiotic {
network: address!("A42ec46F2c9DC671a72218E145CC13dc119fB722"),
operator_registry: address!("Ad817a6Bc954F678451A71363f04150FDD81Af9F"),
network_opt_in_service: address!("7133415b33B438843D581013f98A08704316633c"),
vault_factory: address!("AEb6bdd95c502390db8f52c8909F703E9Af6a346"),
vault_configurator: address!("29300b1d3150B4E2b12fE80BE72f365E200441EC"),
network_registry: address!("C773b1011461e7314CF05f97d95aa8e92C1Fd8aA"),
network_middleware_service: address!("D7dC9B366c027743D90761F71858BCa83C6899Ad"),
supported_vaults: [
// TODO: fill these in
address!("0000000000000000000000000000000000000000"),
address!("0000000000000000000000000000000000000000"),
address!("0000000000000000000000000000000000000000"),
address!("0000000000000000000000000000000000000000"),
address!("0000000000000000000000000000000000000000"),
address!("0000000000000000000000000000000000000000"),
],
},
eigen_layer: EigenLayer {
avs_directory: address!("135dda560e946695d6f155dacafc6f1f25c1f5af"),
delegation_manager: address!("39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A"),
strategy_manager: address!("858646372CC42E1A627fcE94aa7A7033e7CF075A"),
supported_strategies: EigenLayerStrategies {
st_eth: address!("93c4b944D05dfe6df7645A86cd2206016c51564D"),
r_eth: address!("1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2"),
// TODO: fill this in
w_eth: address!("0000000000000000000000000000000000000000"),
cb_eth: address!("54945180dB7943c0ed0FEE7EdaB2Bd24620256bc"),
m_eth: address!("298aFB19A105D59E74658C4C334Ff360BadE6dd2"),
},
},
collateral: [
("wst_eth".to_string(), address!("7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0")),
("r_eth".to_string(), address!("ae78736Cd615f374D3085123A210448E74Fc6393")),
("w_eth".to_string(), address!("C02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2")),
("cb_eth".to_string(), address!("Be9895146f7AF43049ca1c1AE358B0541Ea49704")),
("m_eth".to_string(), address!("d5F7838F5C461fefF7FE49ea5ebaF7728bB0ADfa")),
// TODO: this one
("st_eth".to_string(), address!("3F1c547b21f65e10480dE3ad8E19fAAC46C95034")),
],
};
}

0 comments on commit 8020995

Please sign in to comment.