Skip to content

Commit

Permalink
fix: compile
Browse files Browse the repository at this point in the history
  • Loading branch information
ypatil12 committed Oct 17, 2024
1 parent 25617f0 commit a4fd655
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 605 deletions.
2 changes: 1 addition & 1 deletion script/deploy/mainnet/Deploy_Strategy_Factory.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ contract MainnetStrategyFactoryDeploy is ExistingDeploymentParser {
// Sanity Checks
_verifyContractPointers();
_verifyImplementations();
_verifyContractsInitialized();
_verifyContractsInitialized(false);
_verifyInitializationParams();

logAndOutputContractAddresses("script/output/mainnet/v0.3.2-mainnet-strategy-factory.output.json");
Expand Down
6 changes: 3 additions & 3 deletions script/deploy/mainnet/v0.4.3-upgrade_rewardsCoordinator.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ contract Upgrade_Mainnet_RewardsCoordinator is ExistingDeploymentParser, Timeloc
emit log_named_bytes("calldata_to_timelock_executing_action", calldata_to_timelock_executing_action);
}

function test_mainnet_rc_upgrade() public {
function run_mainnet_rc_upgrade() public {
run();

vm.warp(dayToQueueAction);
Expand Down Expand Up @@ -185,8 +185,8 @@ contract Upgrade_Mainnet_RewardsCoordinator is ExistingDeploymentParser, Timeloc
);
}

function test_set_reward_for_all_submitter(address hopper) public {
test_mainnet_rc_upgrade();
function run_set_reward_for_all_submitter(address hopper) public {
run_mainnet_rc_upgrade();

// Set reward for all submitters
vm.prank(operationsMultisig);
Expand Down
6 changes: 1 addition & 5 deletions src/contracts/core/AVSDirectory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,6 @@ contract AVSDirectory is
avsOperatorStatus[msg.sender][operator] != OperatorAVSRegistrationStatus.REGISTERED,
OperatorAlreadyRegisteredToAVS()
);
// Assert `operator` has not already spent `operatorSignature.salt`.
require(!operatorSaltIsSpent[operator][operatorSignature.salt], SignatureSaltSpent());
// Assert `operator` is a registered operator.
require(delegation.isOperator(operator), OperatorDoesNotExist());

// Assert `operator` has not already spent `operatorSignature.salt`.
require(!operatorSaltIsSpent[operator][operatorSignature.salt], SaltSpent());
Expand Down Expand Up @@ -511,4 +507,4 @@ contract AVSDirectory is
operatorSetId: uint32(uint256(encoded) & type(uint96).max)
});
}
}
}
2 changes: 1 addition & 1 deletion src/contracts/core/DelegationManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -827,4 +827,4 @@ contract DelegationManager is
)
);
}
}
}
67 changes: 1 addition & 66 deletions src/contracts/interfaces/IAVSDirectory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,6 @@ interface IAVSDirectoryErrors {
/// @dev Thrown when `operator` is already registered to the AVS.
error OperatorAlreadyRegisteredToAVS();

<<<<<<< HEAD
interface IAVSDirectory is ISignatureUtils {
/// Operator Status

/// @dev Thrown when an operator does not exist in the DelegationManager
error OperatorDoesNotExist();
/// @dev Thrown when `operator` is not registered to the AVS.
error OperatorNotRegistered();
/// @dev Thrown when `operator` is already registered to the AVS.
error OperatorAlreadyRegistered();

/// Signatures

/// @dev Thrown when attempting to spend a spent eip-712 salt.
error SignatureSaltSpent();
/// @dev Thrown when attempting to use an expired eip-712 signature.
error SignatureExpired();

=======
>>>>>>> eabea038 (feat: squashed slashing for devnet)
/// @notice Enum representing the status of an operator's registration with an AVS
/// @dev Thrown when an invalid AVS is provided.
error InvalidAVS();
Expand Down Expand Up @@ -117,11 +97,6 @@ interface IAVSDirectoryEvents is IAVSDirectoryTypes {

interface IAVSDirectory is IAVSDirectoryEvents, IAVSDirectoryErrors, ISignatureUtils {
/**
<<<<<<< HEAD
* @notice Called by the AVS's service manager contract 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.
=======
*
* EXTERNAL FUNCTIONS
*
Expand Down Expand Up @@ -261,7 +236,6 @@ interface IAVSDirectory is IAVSDirectoryEvents, IAVSDirectoryErrors, ISignatureU
*
* @dev msg.sender must be the AVS.
* @dev Only used by legacy M2 AVSs that have not integrated with operator sets.
>>>>>>> eabea038 (feat: squashed slashing for devnet)
*/
function registerOperatorToAVS(
address operator,
Expand All @@ -282,23 +256,9 @@ interface IAVSDirectory is IAVSDirectoryEvents, IAVSDirectoryErrors, ISignatureU
) external;

/**
<<<<<<< HEAD
* @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.
=======
*
* VIEW FUNCTIONS
*
>>>>>>> eabea038 (feat: squashed slashing for devnet)
*/
function operatorSaltIsSpent(address operator, bytes32 salt) external view returns (bool);

Expand All @@ -310,13 +270,6 @@ interface IAVSDirectory is IAVSDirectoryEvents, IAVSDirectoryErrors, ISignatureU
function isOperatorSet(address avs, uint32 operatorSetId) external view returns (bool);

/**
<<<<<<< HEAD
* @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 address of the service manager contract for the AVS that 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
=======
* @notice Returns operator set an operator is registered to in the order they were registered.
* @param operator The operator address to query.
* @param index The index of the enumerated list of operator sets.
Expand Down Expand Up @@ -415,7 +368,6 @@ interface IAVSDirectory is IAVSDirectoryEvents, IAVSDirectoryErrors, ISignatureU
* @param avs The AVS the operator is registering with.
* @param salt A unique and single-use value associated with the approver's signature.
* @param expiry The time after which the approver's signature becomes invalid.
>>>>>>> eabea038 (feat: squashed slashing for devnet)
*/
function calculateOperatorAVSRegistrationDigestHash(
address operator,
Expand Down Expand Up @@ -457,22 +409,6 @@ interface IAVSDirectory is IAVSDirectoryEvents, IAVSDirectoryErrors, ISignatureU
/// @notice The EIP-712 typehash for the Registration struct used by the contract.
function OPERATOR_AVS_REGISTRATION_TYPEHASH() external view returns (bytes32);

<<<<<<< HEAD
/**
* @notice Called by an operator to cancel a salt that has been used to register with an AVS.
* @param salt A unique and single use value associated with the approver signature.
*/
function cancelSalt(bytes32 salt) external;

/**
* @notice Getter function for the current EIP-712 domain separator for this contract.
*
* @dev The domain separator will change in the event of a fork that changes the ChainID.
* @dev By introducing a domain separator the DApp developers are guaranteed that there can be no signature collision.
* for more detailed information please read EIP-712.
*/
function domainSeparator() external view returns (bytes32);
=======
/// @notice The EIP-712 typehash for the OperatorSetRegistration struct used by the contract.
function OPERATOR_SET_REGISTRATION_TYPEHASH() external view returns (bytes32);

Expand All @@ -481,5 +417,4 @@ interface IAVSDirectory is IAVSDirectoryEvents, IAVSDirectoryErrors, ISignatureU
address operator,
uint32 operatorSetId
) external view returns (bool registered, uint32 lastDeregisteredTimestamp);
>>>>>>> eabea038 (feat: squashed slashing for devnet)
}
}
17 changes: 1 addition & 16 deletions src/contracts/interfaces/IDelegationManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -404,21 +404,6 @@ interface IDelegationManager is ISignatureUtils, IDelegationManagerErrors, IDele
*
*/

/**
* @notice Owner-only function for modifying the value of the `minWithdrawalDelayBlocks` variable.
* @param newMinWithdrawalDelayBlocks new value of `minWithdrawalDelayBlocks`.
*/
function setMinWithdrawalDelayBlocks(uint256 newMinWithdrawalDelayBlocks) external;

/**
* @notice Called by owner to set the minimum withdrawal delay blocks for each passed in strategy
* Note that the min number of blocks to complete a withdrawal of a strategy is
* MAX(minWithdrawalDelayBlocks, strategyWithdrawalDelayBlocks[strategy])
* @param strategies The strategies to set the minimum withdrawal delay blocks for
* @param withdrawalDelayBlocks The minimum withdrawal delay blocks to set for each strategy
*/
function setStrategyWithdrawalDelayBlocks(IStrategy[] calldata strategies, uint256[] calldata withdrawalDelayBlocks) external;

/**
* @notice returns the address of the operator that `staker` is delegated to.
* @notice Mapping: staker => operator whom the staker is currently delegated to.
Expand Down Expand Up @@ -573,4 +558,4 @@ interface IDelegationManager is ISignatureUtils, IDelegationManagerErrors, IDele

/// @notice The EIP-712 typehash for the DelegationApproval struct used by the contract
function DELEGATION_APPROVAL_TYPEHASH() external view returns (bytes32);
}
}
Loading

0 comments on commit a4fd655

Please sign in to comment.