Skip to content

Conversation

@ericglau
Copy link
Member

@ericglau ericglau commented Apr 2, 2024

  • Use OpenZeppelin Contracts for Cairo v0.11.0.
  • Add ERC1155.
  • Remove redundant not paused assertions for camel case functions.
  • Fix use of ERC20 mixin.
  • Sort imports alphabetically.

@socket-security
Copy link

socket-security bot commented Apr 2, 2024

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

Package New capabilities Transitives Size Publisher
npm/@types/[email protected] None +3 2.18 MB types
npm/[email protected] None 0 12.8 kB ljharb
npm/[email protected] None 0 17.6 kB ljharb
npm/[email protected] None 0 5.29 MB highlightjs_bot
npm/[email protected] None 0 10.5 kB ericglau
npm/[email protected] None 0 42 kB haltman
npm/[email protected] None 0 10 kB evilebottnawi
npm/[email protected] None 0 14.6 kB cwmma
npm/[email protected] None 0 28.8 kB ljharb
npm/[email protected] None 0 28.9 kB ljharb
npm/[email protected] eval 0 31.9 kB ljharb
npm/[email protected] None 0 18.7 kB ljharb
npm/[email protected] None 0 19.1 kB ljharb
npm/[email protected] None 0 22 kB ljharb
npm/[email protected] None 0 23.3 kB ljharb
npm/[email protected] None 0 3.43 kB juliangruber
npm/[email protected] environment 0 253 kB isaacs
npm/[email protected] environment, shell +1 71.3 kB simenb
npm/[email protected] environment, filesystem, unsafe 0 1.91 MB pi0
npm/[email protected] Transitive: environment +8 1.76 MB stuk
npm/[email protected] None 0 20.3 kB lukeed
npm/[email protected] filesystem 0 17.7 kB antonk52
npm/[email protected] environment, eval 0 265 kB smhg
npm/[email protected] filesystem, network +1 86.7 kB bphogan
npm/[email protected] environment 0 4.96 kB lukeed
npm/[email protected] None 0 449 kB antfu
npm/[email protected] None 0 602 kB schalkneethling
npm/[email protected] None 0 2.97 kB thejameskyle
npm/[email protected] None 0 69.5 kB isaacs
npm/[email protected] None 0 13.3 kB lukeed
npm/[email protected] None 0 32.7 kB lukeed
npm/[email protected] filesystem, network, shell +2 24.3 kB jongleberry
npm/[email protected] None 0 21.2 kB sindresorhus
npm/[email protected] None 0 58.9 kB addaleax
npm/[email protected] None +2 41.4 kB sindresorhus
npm/[email protected] None 0 54.3 kB goto-bus-stop
npm/[email protected] None 0 3.02 kB sindresorhus
npm/[email protected] filesystem +1 991 kB isaacs
npm/[email protected] None 0 6.02 kB sindresorhus
npm/[email protected] unsafe 0 13.5 kB danez
npm/[email protected] None 0 151 kB ludovicofischer
npm/[email protected] None +3 68 kB ludovicofischer
npm/[email protected] None 0 14 kB ludovicofischer
npm/[email protected] None 0 11.6 kB ludovicofischer
npm/[email protected] None 0 7.04 kB ludovicofischer
npm/[email protected] None 0 4.5 kB ludovicofischer
npm/[email protected] None 0 6.58 kB ludovicofischer
npm/[email protected] Transitive: filesystem +1 35.1 kB ryanzim
npm/[email protected] None 0 8.45 kB ai
npm/[email protected] environment, unsafe +1 692 kB ai
npm/[email protected] environment 0 21.7 kB ai
npm/[email protected] None +1 93.7 kB ludovicofischer
npm/[email protected] None +3 82.9 kB ludovicofischer
npm/[email protected] None 0 18.5 kB ludovicofischer
npm/[email protected] None 0 10.3 kB ludovicofischer
npm/[email protected] None 0 8.13 kB ludovicofischer
npm/[email protected] None 0 10.1 kB ludovicofischer
npm/[email protected] None 0 12.2 kB evilebottnawi
npm/[email protected] None 0 22.4 kB evilebottnawi
npm/[email protected] None 0 15 kB evilebottnawi
npm/[email protected] None 0 9.66 kB evilebottnawi
npm/[email protected] None 0 13.9 kB ai
npm/[email protected] None 0 4.54 kB ludovicofischer
npm/[email protected] None 0 6.03 kB ludovicofischer
npm/[email protected] None 0 8.51 kB ludovicofischer
npm/[email protected] None 0 7.26 kB ludovicofischer
npm/[email protected] None 0 11.7 kB ludovicofischer
npm/[email protected] None 0 6.5 kB ludovicofischer
npm/[email protected] None 0 7.32 kB ludovicofischer
npm/[email protected] None 0 11.1 kB ludovicofischer
npm/[email protected] None 0 6.01 kB ludovicofischer
npm/[email protected] None 0 31.5 kB ludovicofischer
npm/[email protected] None +3 76 kB ludovicofischer
npm/[email protected] None 0 9.19 kB ludovicofischer
npm/[email protected] None +1 203 kB evilebottnawi
npm/[email protected] Transitive: environment, filesystem +2 1.32 MB ludovicofischer
npm/[email protected] None 0 4.64 kB ludovicofischer
npm/[email protected] None 0 27.2 kB evilebottnawi
npm/[email protected] environment, filesystem +2 228 kB ai
npm/[email protected] None +2 52.5 kB sindresorhus
npm/[email protected] None 0 23.9 kB lukeed
npm/[email protected] environment, filesystem +2 185 kB ljharb
npm/[email protected] filesystem 0 17.3 kB isaacs
npm/[email protected] environment, filesystem +2 291 kB isaacs
npm/[email protected] environment, network, shell 0 14.4 kB thgh
npm/[email protected] environment, filesystem Transitive: network +53 4.59 MB anidetrix
npm/[email protected] filesystem 0 15.2 kB dummdidumm
npm/[email protected] eval Transitive: environment, filesystem, shell +4 2.25 MB trysound
npm/[email protected] environment, filesystem, unsafe +1 6.88 MB lukastaegert
npm/[email protected] environment, filesystem +1 2.43 MB lukastaegert
npm/[email protected] None 0 31.5 kB lukeed
npm/[email protected] filesystem +2 219 kB rich_harris
npm/[email protected] None 0 5.44 kB lukeed
npm/[email protected] environment, filesystem, network +3 54 kB lukeed
npm/[email protected] None 0 238 kB frangio
npm/[email protected] None 0 157 kB rich_harris
npm/[email protected] None 0 140 kB 7rulnik
npm/[email protected] None +2 44.4 kB sindresorhus
npm/[email protected] None +1 9.34 kB sindresorhus
npm/[email protected] None 0 3.31 kB sindresorhus
npm/[email protected] Transitive: environment, filesystem, shell +7 2.49 MB alangpierce
npm/[email protected] Transitive: environment, filesystem, unsafe +5 8.96 MB svelte-language-tools-deploy
npm/[email protected] environment, filesystem 0 103 kB kaisermann
npm/[email protected] None 0 10.6 MB conduitry
npm/[email protected] None +7 3.06 MB svelte-admin
npm/[email protected] environment, filesystem +3 5.54 MB adamwathan
npm/[email protected] None 0 7.91 kB forbeslindesay
npm/[email protected] environment 0 2.07 MB atomiks
npm/[email protected] None 0 66.8 MB typescript-bot
npm/[email protected] environment 0 33.7 kB goto-bus-stop
npm/[email protected] None 0 123 kB ctavan
npm/[email protected] None +4 92.7 kB ljharb
npm/[email protected] environment, filesystem, shell Transitive: eval, unsafe +24 1.19 MB ivasilov
npm/[email protected] environment 0 448 kB eemeli
npm/[email protected] environment 0 57.1 kB oss-bot

🚮 Removed packages: npm/@nomicfoundation/[email protected]

View full report↗︎

@socket-security
Copy link

socket-security bot commented Apr 2, 2024

👍 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]

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 Apr 2, 2024

@SocketSecurity ignore npm/[email protected]

Copy link
Member

@ericnordelo ericnordelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@andrew-fleming andrew-fleming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good! One small thing: I know it's by design to import the components first, but it appears a little unorganized when, for instance, selecting Roles and Upgradeable. Here's the ouput:

    use openzeppelin::token::erc1155::ERC1155Component;
    use openzeppelin::introspection::src5::SRC5Component
    use openzeppelin::access::accesscontrol::AccessControlComponent
    use openzeppelin::upgrades::UpgradeableComponent
    use openzeppelin::access::accesscontrol::DEFAULT_ADMIN_ROLE
    use openzeppelin::upgrades::interface::IUpgradeable;

The cairo formatter alphabetizes the imports on our end. IMO it'd make sense to follow the formatter. It should also help simplify getCategorizedImports in the wizard 🤞 what do you think?

@ericglau
Copy link
Member Author

ericglau commented Apr 3, 2024

@andrew-fleming Thanks for the suggestion! Updated to sort the imports alphabetically.

@ericglau ericglau requested a review from andrew-fleming April 3, 2024 14:27
Copy link
Contributor

@andrew-fleming andrew-fleming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment on lines 264 to 266
assert(self.erc1155.is_approved_for_all(account, caller), ERC1155Component::Errors::UNAUTHORIZED);␊
if account != caller {␊
assert(self.erc1155.is_approved_for_all(account, caller), ERC1155Component::Errors::UNAUTHORIZED);␊
}␊
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ericglau ericglau merged commit 8d9189d into OpenZeppelin:master Apr 3, 2024
@ericglau ericglau deleted the cairo1155 branch April 3, 2024 17:53
@github-actions github-actions bot mentioned this pull request Jun 20, 2025
@github-actions github-actions bot mentioned this pull request Aug 20, 2025
This was referenced Sep 9, 2025
@github-actions github-actions bot mentioned this pull request Sep 16, 2025
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