Merged
Conversation
Removed the erc2535-diamond-template submodule and references, and added diamond-lib as a new submodule. Updated remappings to point to diamond-lib paths instead of erc2535-diamond-template.
Replaces ERC165Init with DiamondInit in deployment and helper scripts. Updates the helper to generate initialization calldata instead of DiamondArgs, aligning with new contract initialization requirements.
Refactored the HostItTickets contract constructor to accept FacetCut array, init contract address, and calldata directly, aligning with the updated Diamond contract interface. Updated parameter names and documentation accordingly.
Introduces the diamond-lib repository as a submodule under lib/. This allows the project to track and use code from diamond-lib at commit 95faf293ac04cb21f41fcf2ae4f51f68fba037ec.
Refreshed revisions for several libraries and added diamond-lib to the lock file to ensure the latest versions are used.
Added a clarifying comment before the call to _getAddressesAndFeesByChainId to improve code readability.
Moved the _createErc6551Account function to a new location within the LibMarketplace library and removed unused refund-related functions. This improves code organization and removes incomplete or placeholder code.
Introduces claimRefund to MarketplaceFacet and IMarketplace, allowing users to claim ticket refunds within a specified period. Updates LibMarketplace with internal refund logic, new error types, and related event emissions. Refactors fee setting and withdrawal logic for consistency and improved event handling.
Updates LibFactory to set maxTicketsPerUser in extraTicketData if provided. Also changes updatedAt field to use uint48 for increased timestamp range.
Added tests for claiming ticket refunds in ETH, USDT, and USDC to MarketplaceTest. Updated DeployedHostItTickets to set isRefundable to true for paid tickets, enabling refund functionality in tests.
Changed EIP-2535 to ERC-2535 in HostItTickets documentation for accuracy. Updated TicketProxy constructor to be payable, allowing it to receive Ether.
Replaced dynamic HostIt fee basis points with a constant, refactored fee calculation to use pure functions, and removed related setter logic. Updated IMarketplace interface with detailed documentation and adjusted function signatures. Added HOST_IT_SALT to .env.example for deployment configuration.
The createTicket function in FactoryFacet, IFactory, and LibFactory now returns the ticket ID (uint64) after creation. This change allows callers to immediately obtain the new ticket's identifier for further processing or reference.
Also removed unused fee bps from storage
Clean up deployment scripts and fix remapping issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces significant architectural improvements, new features for the ticketing and marketplace systems, and several critical bug fixes. The primary focus of this release is migrating to a more robust diamond standard implementation, adding refund and instant withdrawal capabilities, and improving the stability of our deployment and test suites.
🚀 Features & Enhancements
isRefundablelogic to ticket creation and processing.maxTicketsPerUserto the ticket data structure to enforce per-user purchasing limits.ticketIdfor easier downstream processing.🏗️ Architecture & Refactoring
erc2535-diamond-templatewith the modernizeddiamond-libas a git submodule.HostItTicketsfacet initialization.HostItfee calculation logic.LibMarketplacefor better gas efficiency and readability.uint48to prevent year-2038 issues while optimizing storage packing.tokenIdvariables to useuint40for tighter struct packing.🐛 Bug Fixes
Unauthorized()revert in testsetUp()phases by properly inlining the diamond deployment and ensuring the correctmsg.senderexecutes thediamondCutinitialization.indexedkeywords from array types in logs which caused compilation and decoding issues.🧹 Maintenance & Developer Experience
console2logs from deployment scripts and reorganized script helper imports.🧪 Testing
test_claimRefundETH,test_claimRefundUSDC, etc.) and instant withdrawals.Factory,CheckIn, andMarketplacepass successfully.