forked from Layr-Labs/eigenlayer-middleware
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e28d90f
commit fa830e3
Showing
8 changed files
with
168 additions
and
93 deletions.
There are no files selected for viewing
Submodule eigenlayer-contracts
updated
from 47f123 to fef647
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,34 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity =0.8.12; | ||
pragma solidity ^0.8.12; | ||
|
||
import {IAVSDirectory, ISignatureUtils} from "eigenlayer-contracts/src/contracts/interfaces/IAVSDirectory.sol"; | ||
|
||
contract AVSDirectoryMock is IAVSDirectory { | ||
/** | ||
* @notice Called by an avs to register an operator with the avs. | ||
* @param operator The address of the operator to register. | ||
* @param operatorSignature The signature, salt, and expiry of the operator's signature. | ||
*/ | ||
mapping(address => mapping(bytes32 => bool)) public operatorSaltIsSpentMapping; | ||
|
||
function registerOperatorToAVS( | ||
address operator, | ||
ISignatureUtils.SignatureWithSaltAndExpiry memory operatorSignature | ||
) external {} | ||
|
||
/** | ||
* @notice Called by an avs to deregister an operator with the avs. | ||
* @param operator The address of the operator to deregister. | ||
*/ | ||
function deregisterOperatorFromAVS(address operator) external {} | ||
|
||
/** | ||
* @notice Called by an AVS to emit an `AVSMetadataURIUpdated` event indicating the information has updated. | ||
* @param metadataURI The URI for metadata associated with an AVS | ||
* @dev Note that the `metadataURI` is *never stored * and is only emitted in the `AVSMetadataURIUpdated` event | ||
*/ | ||
function updateAVSMetadataURI(string calldata metadataURI) external {} | ||
|
||
/** | ||
* @notice Returns whether or not the salt has already been used by the operator. | ||
* @dev Salts is used in the `registerOperatorToAVS` function. | ||
*/ | ||
function operatorSaltIsSpent(address operator, bytes32 salt) external view returns (bool) {} | ||
|
||
/** | ||
* @notice Calculates the digest hash to be signed by an operator to register with an AVS | ||
* @param operator The account registering as an operator | ||
* @param avs The AVS the operator is registering to | ||
* @param salt A unique and single use value associated with the approver signature. | ||
* @param expiry Time after which the approver's signature becomes invalid | ||
*/ | ||
function operatorSaltIsSpent(address operator, bytes32 salt) external view returns (bool) { | ||
return operatorSaltIsSpentMapping[operator][salt]; | ||
} | ||
|
||
function calculateOperatorAVSRegistrationDigestHash( | ||
address operator, | ||
address avs, | ||
bytes32 salt, | ||
uint256 expiry | ||
) external view returns (bytes32) {} | ||
|
||
/// @notice The EIP-712 typehash for the Registration struct used by the contract | ||
function OPERATOR_AVS_REGISTRATION_TYPEHASH() external view returns (bytes32) {} | ||
} | ||
|
||
function cancelSalt(bytes32 salt) external {} | ||
|
||
function domainSeparator() external view returns (bytes32) {} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity ^0.8.12; | ||
|
||
import "../../src/unaudited/ECDSAServiceManagerBase.sol"; | ||
|
||
contract ECDSAServiceManagerMock is ECDSAServiceManagerBase { | ||
constructor( | ||
address _avsDirectory, | ||
address _stakeRegistry, | ||
address _rewardsCoordinator, | ||
address _delegationManager | ||
) | ||
ECDSAServiceManagerBase(_avsDirectory, _stakeRegistry, _rewardsCoordinator, _delegationManager) | ||
{} | ||
|
||
function initialize( | ||
address initialOwner, | ||
address rewardsInitiator | ||
) public virtual initializer { | ||
__ServiceManagerBase_init(initialOwner, rewardsInitiator); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity ^0.8.12; | ||
|
||
import "../../src/unaudited/ECDSAStakeRegistry.sol"; | ||
|
||
/** | ||
* @title Mock for ECDSAStakeRegistry | ||
* @dev This contract is a mock implementation of the ECDSAStakeRegistry for testing purposes. | ||
*/ | ||
contract ECDSAStakeRegistryMock is ECDSAStakeRegistry { | ||
|
||
constructor(IDelegationManager _delegationManager) ECDSAStakeRegistry(_delegationManager) { | ||
} | ||
} |
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
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