Skip to content

Commit

Permalink
fix: update integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenli86 committed Feb 16, 2025
1 parent 50c60bc commit 70cf063
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/test/integration/IntegrationBase.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ abstract contract IntegrationBase is IntegrationDeployer, TypeImporter {
function _newRandomAVS() internal returns (AVS avs, OperatorSet[] memory operatorSets) {
string memory avsName = string.concat("avs", numAVSs.toString());
avs = _genRandAVS(avsName);
avs.updateAVSMetadataURI("https://example.com");
operatorSets = avs.createOperatorSets(_randomStrategies());
++numAVSs;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ contract Integration_Deposit_Delegate_Allocate_Slash_Queue_Redeposit is Integrat
staker.delegateTo(operator);
check_Delegation_State(staker, operator, strategies, shares);

// update AVS metadata URI
avs.updateAVSMetadataURI("https://example.com");

// Create operator set and register operator
operatorSet = avs.createOperatorSet(strategies);
operator.registerForOperatorSet(operatorSet);
Expand Down
12 changes: 12 additions & 0 deletions src/test/integration/users/AVS.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ contract AVS is Logger, IAllocationManagerTypes, IAVSRegistrar {
/// AllocationManager
/// -----------------------------------------------------------------------

function updateAVSMetadataURI(
string memory uri
) public createSnapshot {
print.method("updateAVSMetadataURI");

console.log("Setting AVS metadata URI to: %s", uri);
_tryPrankAppointee_AllocationManager(IAllocationManager.updateAVSMetadataURI.selector);
allocationManager.updateAVSMetadataURI(address(this), uri);

print.gasUsed();
}

function createOperatorSets(
IStrategy[][] memory strategies
) public createSnapshot returns (OperatorSet[] memory operatorSets) {
Expand Down

0 comments on commit 70cf063

Please sign in to comment.