Skip to content

Commit 07919e4

Browse files
revert contract changes
1 parent 1b8797c commit 07919e4

File tree

3 files changed

+7
-36
lines changed

3 files changed

+7
-36
lines changed

packages/hardhat/contracts/Marketplace.sol

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ contract Marketplace is ReentrancyGuard {
88
error ListingCreationFailed();
99
error OnlyListingTypeCanModify();
1010
error ListingNotFound();
11-
error NotListingCreator();
1211

1312
struct ListingPointer {
1413
address creator;
@@ -23,8 +22,6 @@ contract Marketplace is ReentrancyGuard {
2322
event ListingCreated(uint256 indexed id, address indexed creator, address indexed listingType, uint256 listingId, string contenthash);
2423
event ListingAction(uint256 indexed id, address indexed caller, bytes32 action);
2524
event ListingActivationChanged(uint256 indexed listingId, bool active);
26-
event ListingDeleted(uint256 indexed id);
27-
event ListingContenthashUpdated(uint256 indexed id, string contenthash);
2825

2926
function createListing(
3027
address listingType,
@@ -56,24 +53,6 @@ contract Marketplace is ReentrancyGuard {
5653
emit ListingActivationChanged(listingId, active);
5754
}
5855

59-
function deleteListing(uint256 listingId) external {
60-
ListingPointer storage record = listings[listingId];
61-
if (record.creator == address(0)) revert ListingNotFound();
62-
if (msg.sender != record.creator) revert NotListingCreator();
63-
64-
delete listings[listingId];
65-
emit ListingDeleted(listingId);
66-
}
67-
68-
function setListingContenthash(uint256 listingId, string calldata newContenthash) external {
69-
ListingPointer storage record = listings[listingId];
70-
if (record.creator == address(0)) revert ListingNotFound();
71-
if (msg.sender != record.creator) revert NotListingCreator();
72-
73-
record.contenthash = newContenthash;
74-
emit ListingContenthashUpdated(listingId, newContenthash);
75-
}
76-
7756
function getListing(uint256 id) external view returns (
7857
address creator,
7958
address listingType,

packages/hardhat/contracts/SimpleListings.sol

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ contract SimpleListings is IListingType {
3434
);
3535
event SimpleListingSold(uint256 indexed listingId, address indexed buyer, uint256 price, address paymentToken);
3636
event SimpleListingClosed(uint256 indexed listingId, address indexed caller);
37-
event SimpleListingUpdated(uint256 indexed listingId, address indexed caller, address paymentToken, uint256 price);
3837

3938
constructor(address _marketplace) {
4039
if (_marketplace == address(0)) revert MarketplaceZeroAddress();
@@ -108,20 +107,6 @@ contract SimpleListings is IListingType {
108107
emit SimpleListingClosed(listingId, caller);
109108
}
110109

111-
function update(
112-
uint256 listingId,
113-
address creator,
114-
bool,
115-
address caller,
116-
bytes calldata data
117-
) external onlySelf {
118-
if (creator != caller) revert NotCreator();
119-
(address paymentToken, uint256 price) = abi.decode(data, (address, uint256));
120-
if (price == 0) revert PriceZero();
121-
listings[listingId] = SimpleListing({ paymentToken: paymentToken, price: price });
122-
emit SimpleListingUpdated(listingId, caller, paymentToken, price);
123-
}
124-
125110
function handleAction(
126111
uint256 listingId,
127112
address creator,

packages/indexer/src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ ponder.on("Marketplace:ListingActivationChanged" as any, async ({ event, context
241241
.where(eq(listings.id, args.listingId.toString()));
242242
});
243243

244+
<<<<<<< Updated upstream
245+
<<<<<<< Updated upstream
244246
ponder.on("Marketplace:ListingDeleted" as any, async ({ event, context }) => {
245247
const { db } = context;
246248
const args = (event as any).args;
@@ -316,6 +318,11 @@ ponder.on("Marketplace:ListingContenthashUpdated" as any, async ({ event, contex
316318
console.error(`[Ponder] Error handling ListingContenthashUpdated for ${listingId}:`, e);
317319
}
318320
});
321+
=======
322+
=======
323+
>>>>>>> Stashed changes
324+
// (No SimpleListings event handlers required)
325+
>>>>>>> Stashed changes
319326

320327
// --- EAS Reviews indexing ---
321328
// Read new per-chain keyed shape only

0 commit comments

Comments
 (0)