@@ -135,12 +135,12 @@ contract ERC721EthscriptionsCollectionManager is IProtocolHandler {
135135 }
136136
137137 /// @notice Handle create_collection operation
138- function op_create_collection (bytes32 txHash , bytes calldata data ) external onlyEthscriptions {
138+ function op_create_collection (bytes32 ethscriptionId , bytes calldata data ) external onlyEthscriptions {
139139 // Decode the operation data directly into CollectionMetadata
140140 CollectionMetadata memory metadata = abi.decode (data, (CollectionMetadata));
141141
142142 // Use the ethscription hash as the collection ID
143- bytes32 collectionId = txHash ;
143+ bytes32 collectionId = ethscriptionId ;
144144
145145 // Check if collection already exists
146146 require (collectionState[collectionId].collectionContract == address (0 ), "Collection already exists " );
@@ -165,7 +165,7 @@ contract ERC721EthscriptionsCollectionManager is IProtocolHandler {
165165 // Store collection state
166166 collectionState[collectionId] = CollectionState ({
167167 collectionContract: address (collectionProxy),
168- createEthscriptionId: txHash ,
168+ createEthscriptionId: ethscriptionId ,
169169 currentSize: 0 ,
170170 locked: false
171171 });
@@ -179,10 +179,10 @@ contract ERC721EthscriptionsCollectionManager is IProtocolHandler {
179179 }
180180
181181 /// @notice Handle add_items_batch operation with full metadata
182- function op_add_items_batch (bytes32 txHash , bytes calldata data ) external onlyEthscriptions {
182+ function op_add_items_batch (bytes32 ethscriptionId , bytes calldata data ) external onlyEthscriptions {
183183 // Get who is trying to add items
184184 Ethscriptions ethscriptionsContract = Ethscriptions (ethscriptions);
185- Ethscriptions.Ethscription memory ethscription = ethscriptionsContract.getEthscription (txHash );
185+ Ethscriptions.Ethscription memory ethscription = ethscriptionsContract.getEthscription (ethscriptionId );
186186 address sender = ethscription.creator;
187187
188188 AddItemsBatchOperation memory addOp = abi.decode (data, (AddItemsBatchOperation));
@@ -242,14 +242,14 @@ contract ERC721EthscriptionsCollectionManager is IProtocolHandler {
242242 collection.currentSize++ ;
243243 }
244244
245- emit ItemsAdded (addOp.collectionId, addOp.items.length , txHash );
245+ emit ItemsAdded (addOp.collectionId, addOp.items.length , ethscriptionId );
246246 }
247247
248248 /// @notice Handle remove_items operation
249- function op_remove_items (bytes32 txHash , bytes calldata data ) external onlyEthscriptions {
249+ function op_remove_items (bytes32 ethscriptionId , bytes calldata data ) external onlyEthscriptions {
250250 // Get who is trying to remove items
251251 Ethscriptions ethscriptionsContract = Ethscriptions (ethscriptions);
252- Ethscriptions.Ethscription memory ethscription = ethscriptionsContract.getEthscription (txHash );
252+ Ethscriptions.Ethscription memory ethscription = ethscriptionsContract.getEthscription (ethscriptionId );
253253 address sender = ethscription.creator;
254254
255255 // Decode the operation data
@@ -283,13 +283,13 @@ contract ERC721EthscriptionsCollectionManager is IProtocolHandler {
283283 collection.currentSize-- ;
284284 }
285285
286- emit ItemsRemoved (removeOp.collectionId, removeOp.ethscriptionIds.length , txHash );
286+ emit ItemsRemoved (removeOp.collectionId, removeOp.ethscriptionIds.length , ethscriptionId );
287287 }
288288
289289 /// @notice Handle edit_collection operation
290- function op_edit_collection (bytes32 txHash , bytes calldata data ) external onlyEthscriptions {
290+ function op_edit_collection (bytes32 ethscriptionId , bytes calldata data ) external onlyEthscriptions {
291291 Ethscriptions ethscriptionsContract = Ethscriptions (ethscriptions);
292- Ethscriptions.Ethscription memory ethscription = ethscriptionsContract.getEthscription (txHash );
292+ Ethscriptions.Ethscription memory ethscription = ethscriptionsContract.getEthscription (ethscriptionId );
293293 address sender = ethscription.creator;
294294
295295 EditCollectionOperation memory editOp = abi.decode (data, (EditCollectionOperation));
@@ -315,9 +315,9 @@ contract ERC721EthscriptionsCollectionManager is IProtocolHandler {
315315 }
316316
317317 /// @notice Handle edit_collection_item operation
318- function op_edit_collection_item (bytes32 txHash , bytes calldata data ) external onlyEthscriptions {
318+ function op_edit_collection_item (bytes32 ethscriptionId , bytes calldata data ) external onlyEthscriptions {
319319 Ethscriptions ethscriptionsContract = Ethscriptions (ethscriptions);
320- Ethscriptions.Ethscription memory ethscription = ethscriptionsContract.getEthscription (txHash );
320+ Ethscriptions.Ethscription memory ethscription = ethscriptionsContract.getEthscription (ethscriptionId );
321321 address sender = ethscription.creator;
322322
323323 EditCollectionItemOperation memory editOp = abi.decode (data, (EditCollectionItemOperation));
@@ -347,10 +347,10 @@ contract ERC721EthscriptionsCollectionManager is IProtocolHandler {
347347 }
348348
349349 /// @notice Handle lock_collection operation
350- function op_lock_collection (bytes32 txHash , bytes calldata data ) external onlyEthscriptions {
350+ function op_lock_collection (bytes32 ethscriptionId , bytes calldata data ) external onlyEthscriptions {
351351 // Get the ethscription details from the Ethscriptions contract
352352 Ethscriptions ethscriptionsContract = Ethscriptions (ethscriptions);
353- Ethscriptions.Ethscription memory ethscription = ethscriptionsContract.getEthscription (txHash );
353+ Ethscriptions.Ethscription memory ethscription = ethscriptionsContract.getEthscription (ethscriptionId );
354354 address sender = ethscription.creator; // Who sent this lock operation
355355
356356 // Decode just the collection ID
@@ -371,7 +371,7 @@ contract ERC721EthscriptionsCollectionManager is IProtocolHandler {
371371
372372 /// @notice Handle sync_ownership operation to sync ERC721 ownership with Ethscription ownership
373373 /// @dev Requires specifying the collection ID to sync for, to avoid iterating over unbounded user data
374- function op_sync_ownership (bytes calldata data ) external onlyEthscriptions {
374+ function op_sync_ownership (bytes32 ethscriptionId , bytes calldata data ) external onlyEthscriptions {
375375 // User must specify which collection to sync for
376376 // Decode the operation: collection ID + ethscription IDs to sync
377377 (bytes32 collectionId , bytes32 [] memory ethscriptionIds ) = abi.decode (data, (bytes32 , bytes32 []));
0 commit comments