-
Notifications
You must be signed in to change notification settings - Fork 89
Sandbox Passes contract #1619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wojciech-turek
wants to merge
97
commits into
master
Choose a base branch
from
passes-contract
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sandbox Passes contract #1619
Conversation
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
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
adjisb
reviewed
Mar 5, 2025
[N-09] Game Passes Audit
[H-02] Game Passes Audit
[H-01 FOLLOW UP] Game Passes Audit
[N-04 FOLLOW UP] Game Passes Audit
[N-01 FOLLOW UP] Game Passes Audit
[L-07] Game Passes Audit
[L-06] Game Passes Audit
[EXTRA-02] Game Passes Audit
…re-id [EXTRA-01] Game Passes Audit
[N-08] Game Passes Audit
[N-07] Game Passes Audit
[N-06] Game Passes Audit
[N-05] Game Passes Audit
[N-04] Game Passes Audit
[N-03] Game Passes Audit
[N-02] Game Passes Audit
[N-01] Game Passes Audit
[L-05] Game Passes Audit
[L-04] Game Passes Audit
[L-03] Game Passes Audit
[L-02] Game Passes Audit
[L-01] Game Passes Audit
[M-04] Game Passes Audit
[M-03] Game Passes Audit
[M-02] Game Passes Audit
[H-01] Game Passes Audit
…mart-contracts into passes-contract
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.
SandboxPasses1155Upgradeable Implementation
This PR introduces a comprehensive, feature-rich ERC1155 implementation for The
Sandbox passes ecosystem. The contract provides a flexible foundation for
digital passes, membership tokens, and access credentials with robust security,
configurability, and user experience features.
Spec:
https://docs.google.com/document/d/1zEVOfVYuUWDeD8h13rcUH3o67cRyp4yt1UtXWUAWbk0/edit?pli=1&tab=t.0
Key Features Added
Configurable Passes: Each token ID represents a unique pass type with
customizable properties including transferability, max supply, max per wallet,
and dedicated treasury address.
Flexible Minting: Multiple minting paths including admin minting,
signature-authorized minting, and burn-to-mint transformations, enabling
diverse distribution strategies.
Soulbound Functionality: Optional non-transferable configuration for
passes that should remain bound to the original owner, with admin-controlled
transfer whitelist exceptions.
Supply Controls: Granular control over token supply, both globally (max
supply) and per user (max per wallet), to manage scarcity and fair
distribution.
Security First: Comprehensive role-based access control, EIP-712 signature
verification, pausable functionality, and meta-transaction support.
Payment Integration: Native support for ERC20 token payments with
configurable treasury addresses per token type.
Upgradeable Design: Implemented using OpenZeppelin's upgradeable contracts
pattern to allow for future improvements without migration.
Royalty Support: Complete ERC2981 implementation for marketplace royalties
on secondary sales.
Technical Implementation
The contract extends multiple OpenZeppelin base contracts including
ERC1155SupplyUpgradeable, AccessControlUpgradeable, ERC2981Upgradeable, and
PausableUpgradeable. It uses structured storage patterns compatible with the
upgradeable contracts pattern.
Error handling is implemented using custom errors for gas efficiency and
improved debugging. Events are emitted for all significant state changes to
support off-chain indexing and UI updates.
The contract has been thoroughly reviewed for security vulnerabilities and gas
optimization.