Skip to content
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

Add recipient constructor argument for premint #435

Merged
merged 5 commits into from
Feb 5, 2025

Conversation

ericglau
Copy link
Member

@ericglau ericglau commented Jan 30, 2025

When ERC20/Stablecoin/Real-World Asset's Premint option is enabled, it currently mints to msg.sender, which is not consistent with current best practices.

This PR changes it to mint to a recipient constructor argument or initializer argument instead.

Note that this is potentially a minor breaking change for users who deploy with this option.

Depends on #434, so only commits starting from e0b2d46 and later need to be reviewed for this PR.
Fixes #73

@ericglau ericglau requested a review from a team January 30, 2025 21:03
Copy link

socket-security bot commented Feb 5, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@nomicfoundation/[email protected] environment Transitive: eval, filesystem, network, shell, unsafe +437 149 MB kanej
npm/@openzeppelin/[email protected] filesystem Transitive: environment, eval, network, shell, unsafe +230 55 MB ericglau
npm/[email protected] 🔁 npm/[email protected] Transitive: eval, unsafe +256 199 MB kanej

🚮 Removed packages: npm/@rollup/[email protected], npm/@rollup/[email protected], npm/@rollup/[email protected], npm/@rollup/[email protected], npm/@rollup/[email protected], npm/@rollup/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

Copy link

socket-security bot commented Feb 5, 2025

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/[email protected], npm/[email protected]

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@ericglau
Copy link
Member Author

ericglau commented Feb 5, 2025

@SocketSecurity ignore npm/[email protected]
Unrelated to this PR, and see #421 (comment)

@ericglau
Copy link
Member Author

ericglau commented Feb 5, 2025

@SocketSecurity ignore npm/[email protected]

Unrelated to this PR, see #430 (comment)

@ericglau ericglau enabled auto-merge (squash) February 5, 2025 18:49
@ericglau ericglau merged commit 1d45113 into OpenZeppelin:master Feb 5, 2025
9 checks passed
@ericglau ericglau deleted the premintarg branch February 5, 2025 18:50
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.

Use constructor parameter for ERC20 Premint
2 participants