Skip to content

Commit

Permalink
fix: operator<>AVS mapping tests (#407)
Browse files Browse the repository at this point in the history
* test: added back avsRegistration tests

* fix: fuzz runs 4096

* fix: broken fuzz test
  • Loading branch information
8sunyuan authored Jan 29, 2024
1 parent fcb32f5 commit 2376405
Show file tree
Hide file tree
Showing 6 changed files with 321 additions and 143 deletions.
15 changes: 15 additions & 0 deletions src/test/events/IAVSDirectoryEvents.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.12;

import "src/contracts/interfaces/IAVSDirectory.sol";

interface IAVSDirectoryEvents {
/**
* @notice Emitted when @param avs indicates that they are updating their MetadataURI string
* @dev Note that these strings are *never stored in storage* and are instead purely emitted in events for off-chain indexing
*/
event AVSMetadataURIUpdated(address indexed avs, string metadataURI);

/// @notice Emitted when an operator's registration status for an AVS is updated
event OperatorAVSRegistrationStatusUpdated(address indexed operator, address indexed avs, IAVSDirectory.OperatorAVSRegistrationStatus status);
}
5 changes: 5 additions & 0 deletions src/test/mocks/ERC20Mock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ contract ERC20Mock is Context, IERC20 {
return _allowances[owner][spender];
}

function mint(address to, uint256 amount) public virtual {
address owner = _msgSender();
_mint(owner, amount);
}

/**
* @dev See {IERC20-approve}.
*
Expand Down
Loading

0 comments on commit 2376405

Please sign in to comment.