chore: wrapper improvements#159
Open
sogipec wants to merge 7 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Updates partner token wrapper contracts/tests to reflect recent wrapper behavior changes (notably around minting flow), along with some readability/formatting tweaks.
Changes:
- Make
PullTokenWrapperImmutableBase.mintoverridable and disable manualmintinPublicWrapperBase. - Adjust
PullTokenWrapperVaultImmutableERC20 metadata construction and relax the corresponding constructor revert assertion in tests. - Replace test setup minting with direct balance seeding (
deal) in burn tests; apply minor formatting changes in scripts/contracts.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/partners/tokenWrappers/PullTokenWrapperVaultImmutable.t.sol | Relaxes constructor revert expectation for zero vault. |
| test/unit/partners/tokenWrappers/NativeTokenUnwrapperImmutable.t.sol | Uses deal instead of mint for burn test setup. |
| test/unit/partners/tokenWrappers/ClaimFeeTokenWrapperImmutable.t.sol | Formats constructor call; uses deal instead of mint for burn test setup. |
| scripts/deployNativeTokenUnwrapper.s.sol | Formats deployment constructor arguments across multiple lines. |
| contracts/partners/tokenWrappers/TokenTGEWrapper.sol | Formats ERC20 constructor arguments across multiple lines. |
| contracts/partners/tokenWrappers/PullTokenWrapperVaultImmutable.sol | Changes wrapper token name source to _vault metadata (with implications for revert behavior/metadata consistency). |
| contracts/partners/tokenWrappers/PullTokenWrapperImmutableBase.sol | Marks mint as virtual to allow overriding. |
| contracts/partners/tokenWrappers/PublicWrapperBase.sol | Overrides mint as a disabled/no-op implementation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dimpar
reviewed
Apr 16, 2026
| constructor( | ||
| address _token, | ||
| address _distributionCreator, | ||
| address _holder, |
There was a problem hiding this comment.
Can you please clarify who is _holder? Is it a contract with a pre-approved wrapper or a multisig?
dimpar
reviewed
Apr 20, 2026
| if (_mezoStaking == address(0)) revert Errors.ZeroAddress(); | ||
| mezoStaking = _mezoStaking; | ||
| lockDuration = _lockDuration; | ||
| IERC20(_token).safeApprove(_mezoStaking, type(uint256).max); |
There was a problem hiding this comment.
MEZO does not implement safeApprove. You can use approve
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.
No description provided.