Skip to content

Conversation

@Oba-One
Copy link
Member

@Oba-One Oba-One commented Sep 29, 2025

Fix critical ERC721 access validation, ETH transfer method, and withdrawal period logic, and integrate Superfluid with NFT contract validation.

This PR addresses several critical issues identified in a recent audit, including a bug where ERC721 tokenId: 0 was incorrectly rejected, inconsistent withdrawal period calculations, and unsafe ETH transfers using .transfer(). It also replaces string reverts with custom errors for gas efficiency and consistency, and introduces robust NFT contract interface validation in the constructor. Finally, it enables Superfluid integration by dynamically fetching host addresses for various chains. Comprehensive tests have been added to cover these fixes and new functionalities.


Open in Cursor Open in Web

This commit enhances the CookieJar contract by adding robust NFT access control, including validation of NFT contracts and support for checking ownership of any token within a collection (tokenId 0). It also refactors the CookieJarFactory to dynamically fetch Superfluid host addresses based on the current chain ID, improving network compatibility. Additionally, it introduces a new `SuperfluidConfig` library for managing Superfluid network configurations and updates error handling for ETH transfers in `UniversalSwapAdapter`.

Co-authored-by: contact <[email protected]>
@cursor
Copy link

cursor bot commented Sep 29, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link

vercel bot commented Sep 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
cookie-jar Error Error Sep 29, 2025 11:29pm

@Oba-One Oba-One merged commit 81a13a3 into release/3.1.0 Sep 29, 2025
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants