Skip to content

Commit

Permalink
Fix: Adding sponsor admin cancel trd
Browse files Browse the repository at this point in the history
  • Loading branch information
ogarciarevett committed May 16, 2024
1 parent 9c97b9c commit 26116dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export const GAME7_ARB_SEPOLIA_CONTRACTS: DeploymentProxyContract[] = [
'updateListing(uint256,(address,uint256,uint256,address,uint256,uint128,uint128,bool))',
'adminUpdateListing(uint256,(address,uint256,uint256,address,uint256,uint128,uint128,bool),address)',
'cancelListing(uint256)',
'adminCancelListing(address,uint256)',
'approveBuyerForListing(uint256,address,bool)',
'approveCurrencyForListing(uint256,address,uint256)',
'buyFromListing(uint256,address,uint256,address,uint256)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,13 @@ contract DirectListingsLogic is IDirectListings, ReentrancyGuard, ERC2771Context
emit CancelledListing(_msgSender(), _listingId);
}

/// @notice Cancel a listing.
function adminCancelListing(address listingCreator, uint256 _listingId) external onlyManagerRole {
_directListingsStorage().listings[_listingId].status = IDirectListings.Status.CANCELLED;
_transferListingTokensToCreator(_directListingsStorage().listings[_listingId]);
emit CancelledListing(listingCreator, _listingId);
}

/// @notice Approve a buyer to buy from a reserved listing.
function approveBuyerForListing(
uint256 _listingId,
Expand Down

0 comments on commit 26116dd

Please sign in to comment.