Skip to content

[L-04] Game Passes Audit #1661

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

Merged
merged 44 commits into from
Apr 15, 2025
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
9355d7f
Adde event coumentation
wojciech-turek Mar 24, 2025
06689e3
Add event for owner change
wojciech-turek Mar 24, 2025
5d279f1
Adhere to EIP-7201
wojciech-turek Mar 24, 2025
01d99a0
Use calldata instead of memory
wojciech-turek Mar 24, 2025
e9ad2c6
Rename the contract
wojciech-turek Mar 24, 2025
31e52d1
Fix function and layout order
wojciech-turek Mar 24, 2025
a64d3eb
Added named parameters in mappings
wojciech-turek Mar 24, 2025
d271d03
Add security contact
wojciech-turek Mar 24, 2025
a81765f
Limit function visibility
wojciech-turek Mar 24, 2025
47b5baf
Remove named return
wojciech-turek Mar 24, 2025
b9a4f9b
Update tests
wojciech-turek Mar 24, 2025
304b2ce
Use signature id instead of sequential nonce
wojciech-turek Mar 25, 2025
164d80a
Use max uint for unlimited editions
wojciech-turek Mar 25, 2025
5645525
Removed unnecessary comments
wojciech-turek Mar 25, 2025
0cf0231
Do a check for the caller for user functions
wojciech-turek Mar 26, 2025
5a61f9d
Disallow same id for burn and mint and setting passes contract as tre…
wojciech-turek Mar 26, 2025
91500df
lint fix
wojciech-turek Mar 26, 2025
8a46f4d
Allow same token burn and mint
wojciech-turek Mar 27, 2025
c2b8e88
Update the comment to prevent confusion
wojciech-turek Mar 27, 2025
b250767
Pre-calculate the storage slots
wojciech-turek Apr 2, 2025
b5bb745
Fix function ordering
wojciech-turek Apr 2, 2025
7c60782
Update naming of the variable and function
wojciech-turek Apr 2, 2025
190726b
Update tests
wojciech-turek Apr 3, 2025
c922808
Update the comments
wojciech-turek Apr 3, 2025
eec49f6
Mark the signature verification functions internal
wojciech-turek Apr 8, 2025
a4d8f9f
Remove redundant check
wojciech-turek Apr 8, 2025
2e3b907
Merge pull request #1682 from thesandboxgame/passes-audit-n-09
wojciech-turek Apr 15, 2025
5dfaeac
Merge pull request #1681 from thesandboxgame/passes-audit-h-02
wojciech-turek Apr 15, 2025
2e3a581
Merge pull request #1678 from thesandboxgame/passes-audit-h-01-follow-up
wojciech-turek Apr 15, 2025
ac03964
Merge pull request #1677 from thesandboxgame/passes-audit-n-04-follow-up
wojciech-turek Apr 15, 2025
e0bc18f
Merge pull request #1676 from thesandboxgame/passes-audit-n-01-follow-up
wojciech-turek Apr 15, 2025
7303c48
Merge pull request #1674 from thesandboxgame/passes-audit-l-07
wojciech-turek Apr 15, 2025
cbe7e70
Merge pull request #1673 from thesandboxgame/no-caller-check
wojciech-turek Apr 15, 2025
67a4af4
Merge pull request #1672 from thesandboxgame/use-max-for-unlimited
wojciech-turek Apr 15, 2025
6701902
Merge pull request #1671 from thesandboxgame/change-nonces-to-signatu…
wojciech-turek Apr 15, 2025
dfa768d
Merge pull request #1670 from thesandboxgame/passes-audit-n-08
wojciech-turek Apr 15, 2025
d2cd760
Merge pull request #1669 from thesandboxgame/passes-audit-n-07
wojciech-turek Apr 15, 2025
7cbe142
Merge pull request #1668 from thesandboxgame/passes-audit-n-06
wojciech-turek Apr 15, 2025
11fb6f8
Merge pull request #1667 from thesandboxgame/passes-audit-n-05
wojciech-turek Apr 15, 2025
eec5487
Merge pull request #1666 from thesandboxgame/passes-audit-n-04
wojciech-turek Apr 15, 2025
d5af5d6
Merge pull request #1665 from thesandboxgame/passes-audit-n-03
wojciech-turek Apr 15, 2025
e93c9b3
Merge pull request #1664 from thesandboxgame/passes-audit-n-02
wojciech-turek Apr 15, 2025
d5f392b
Merge pull request #1663 from thesandboxgame/passes-audit-n-01
wojciech-turek Apr 15, 2025
2563520
Merge pull request #1662 from thesandboxgame/passes-audit-l-05
wojciech-turek Apr 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions packages/game-passes/contracts/GamePasses.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,18 @@ contract SandboxPasses1155Upgradeable is
// =============================================================

/// @notice Emitted when the base URI is updated.
/// @param caller Address that initiated the base URI update
/// @param oldURI Previous base URI value before the update
/// @param newURI New base URI value after the update
event BaseURISet(address indexed caller, string oldURI, string newURI);
/// @notice Emitted when a token is configured.
/// @param caller Address that initiated the token configuration
/// @param tokenId ID of the token being configured
/// @param transferable Whether the token can be transferred
/// @param maxSupply Maximum supply for this token (0 means unlimited)
/// @param maxPerWallet Maximum number of tokens a single wallet can mint (0 means unlimited)
/// @param metadata Token-specific metadata string
/// @param treasuryWallet Address where payments for this token will be sent
event TokenConfigured(
address indexed caller,
uint256 indexed tokenId,
Expand All @@ -45,6 +55,12 @@ contract SandboxPasses1155Upgradeable is
address treasuryWallet
);
/// @notice Emitted when a token configuration is updated.
/// @param caller Address that initiated the token configuration update
/// @param tokenId ID of the token being updated
/// @param maxSupply New maximum supply for this token (0 means unlimited)
/// @param maxPerWallet New maximum number of tokens a single wallet can mint (0 means unlimited)
/// @param metadata New token-specific metadata string
/// @param treasuryWallet New address where payments for this token will be sent
event TokenConfigUpdated(
address indexed caller,
uint256 indexed tokenId,
Expand All @@ -54,10 +70,21 @@ contract SandboxPasses1155Upgradeable is
address treasuryWallet
);
/// @notice Emitted when a token's transferability is updated.
/// @param caller Address that initiated the transferability update
/// @param tokenId ID of the token whose transferability was changed
/// @param transferable New transferability status (true = transferable, false = soulbound)
event TransferabilityUpdated(address indexed caller, uint256 indexed tokenId, bool transferable);
/// @notice Emitted when transfer whitelist is updated.
/// @param caller Address that initiated the whitelist update
/// @param tokenId ID of the token whose whitelist was updated
/// @param accounts Array of addresses that were added to or removed from the whitelist
/// @param allowed Whether the addresses were added to (true) or removed from (false) the whitelist
event TransferWhitelistUpdated(address indexed caller, uint256 indexed tokenId, address[] accounts, bool allowed);
/// @notice Emitted when tokens are recovered from the contract.
/// @param caller Address that initiated the token recovery
/// @param token Address of the ERC20 token being recovered
/// @param recipient Address receiving the recovered tokens
/// @param amount Amount of tokens recovered
event TokensRecovered(address indexed caller, address token, address recipient, uint256 amount);

// =============================================================
Expand Down