Skip to content

Commit

Permalink
Rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Dododododoit committed Jun 11, 2024
1 parent 339ebd9 commit 38b0516
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 1,073 deletions.
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@

EigenLayer is a set of smart contracts deployed on Ethereum that enable restaking of assets to secure new services called AVSs (actively validated services). The core contracts that enable these features can be found in the [`eigenlayer-contracts` repo][core-repo].

<<<<<<< HEAD
=======
This repo contains smart contracts used to create an AVS that interacts with the EigenLayer core contracts. Because these contracts are meant to be used by any AVS, there is no single deployment. However, you can see EigenDA's deployment info on our [docs site](https://docs.eigenlayer.xyz/eigenda/deployed-contracts).

>>>>>>> fixes(m2-mainnet): combined pr for all m2-mainnet fixs (#162)
## Getting Started

* [Branching](#branching)
Expand Down Expand Up @@ -49,7 +44,6 @@ foundryup

forge build
forge test
<<<<<<< HEAD
```

## Deployments
Expand Down Expand Up @@ -86,6 +80,3 @@ The current testnet deployment is on holesky, is from our M2 beta release. You c
[`ProxyAdmin`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/ProxyAdmin.sol) | - | [`0xB043...5c15`](https://holesky.etherscan.io/address/0xB043055dd967A382577c2f5261fA6428f2905c15) | |
[`eigenda/EigenDAServiceManager`](https://github.com/Layr-Labs/eigenda/blob/a33b41561cc3fb4cd6d50a8738e4c5dca43ec0a5/contracts/src/core/EigenDAServiceManager.sol) | [`0xD4A7E1Bd8015057293f0D0A557088c286942e84b`](https://holesky.etherscan.io/address/0xD4A7E1Bd8015057293f0D0A557088c286942e84b) | [`0xa722...67f3`](https://holesky.etherscan.io/address/0xa7227485e6C693AC4566fe168C5E3647c5c267f3) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) |

=======
```
>>>>>>> fixes(m2-mainnet): combined pr for all m2-mainnet fixs (#162)
9 changes: 0 additions & 9 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,4 @@ number_underscore = "thousands"
quote_style = "double"
tab_width = 4

[fmt]
bracket_spacing = false
int_types = "long"
line_length = 100
multiline_func_header = "params_first"
number_underscore = "thousands"
quote_style = "double"
tab_width = 4

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
8 changes: 0 additions & 8 deletions script/ServiceManagerRouterDeploy.s.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
<<<<<<< HEAD
pragma solidity ^0.8.12;
=======
pragma solidity =0.8.12;
>>>>>>> Feat: service manager router (#193)

import {ServiceManagerRouter} from "../src/ServiceManagerRouter.sol";
import "forge-std/Script.sol";
Expand All @@ -16,8 +12,4 @@ contract ServiceManagerRouterDeploy is Script {

vm.stopBroadcast();
}
<<<<<<< HEAD
}
=======
}
>>>>>>> Feat: service manager router (#193)
24 changes: 14 additions & 10 deletions src/RegistryCoordinator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,8 @@ contract RegistryCoordinator is
quorumNumbers: quorumNumbers,
socket: socket,
operatorSignature: operatorSignature,
<<<<<<< HEAD
operatorSignAddr: operatorSignatureAddr
=======
params: params
>>>>>>> Check and update BLS and ECDSA key whenever starting operator
}).numOperatorsPerQuorum;

// For each quorum, validate that the new operator count does not exceed the maximum
Expand Down Expand Up @@ -220,11 +217,8 @@ contract RegistryCoordinator is
quorumNumbers: quorumNumbers,
socket: socket,
operatorSignature: operatorSignature,
<<<<<<< HEAD
operatorSignAddr: msg.sender
=======
params: params
>>>>>>> Check and update BLS and ECDSA key whenever starting operator
});

// Check that each quorum's operator count is below the configured maximum. If the max
Expand Down Expand Up @@ -481,11 +475,8 @@ contract RegistryCoordinator is
bytes calldata quorumNumbers,
string memory socket,
SignatureWithSaltAndExpiry memory operatorSignature,
<<<<<<< HEAD
address operatorSignAddr
=======
IBLSApkRegistry.PubkeyRegistrationParams calldata params
>>>>>>> Check and update BLS and ECDSA key whenever starting operator
) internal virtual returns (RegisterResults memory results) {
/**
* Get bitmap of quorums to register for and operator's current bitmap. Validate that:
Expand Down Expand Up @@ -965,12 +956,25 @@ contract RegistryCoordinator is
return OwnableUpgradeable.owner();
}

function updateBLSPublicKey(IBLSApkRegistry.PubkeyRegistrationParams calldata params) external override {
function updateBLSPublicKey(IBLSApkRegistry.PubkeyRegistrationParams calldata params) external override onlyWhenNotPaused(PAUSED_REGISTER_OPERATOR){
address operator = msg.sender;
bytes32 operatorId = blsApkRegistry.getOperatorId(operator);
require(operatorId != bytes32(0), "RegistryCoordinator.updateBLSPublicKey: operator is not registered");
uint192 currentBitmap = _currentOperatorBitmap(operatorId);
bytes memory quorumsToUpdate = BitmapUtils.bitmapToBytesArray(currentBitmap);
blsApkRegistry.updateBLSPublicKey(operator, quorumsToUpdate, params, pubkeyRegistrationMessageHash(operator));
}

function updateOperatorSignAddr(address signAddr) external override onlyWhenNotPaused(PAUSED_REGISTER_OPERATOR){
address operator = msg.sender;
bytes32 operatorId = blsApkRegistry.getOperatorId(operator);
require(_operatorInfo[operator].status == OperatorStatus.REGISTERED, "RegistryCoordinator.updateOperatorSignAddr: operator is not registered");
stakeRegistry.updateOperatorSignAddr(operator, signAddr);
}

function getOperatorBlsKeyAndSignAddr(address operator) external override view returns (OperatorBlsKeyAndSigner memory) {
(BN254.G1Point memory pubKey, bytes32 pubKeyHash) = blsApkRegistry.getRegisteredPubkey(operator);
address signAddr = stakeRegistry.getOperatorSignAddress(operator);
return OperatorBlsKeyAndSigner(pubKey, pubKeyHash, signAddr);
}
}
Loading

0 comments on commit 38b0516

Please sign in to comment.