Skip to content

Add code comments for compatible Contracts versions#331

Merged
ericglau merged 6 commits intoOpenZeppelin:masterfrom
ericglau:targetversion
Feb 22, 2024
Merged

Add code comments for compatible Contracts versions#331
ericglau merged 6 commits intoOpenZeppelin:masterfrom
ericglau:targetversion

Conversation

@ericglau
Copy link
Member

@ericglau ericglau commented Feb 21, 2024

Fixes #293
Fixes #319

Adds code comments for compatible Contracts versions, and Cairo lang version for Cairo. See preview here.

Solidity example:

// SPDX-License-Identifier: MIT
// Compatible with OpenZeppelin Contracts ^5.0.0
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
...

Cairo example:

// SPDX-License-Identifier: MIT
// Compatible with OpenZeppelin Contracts for Cairo ^0.9.0
// Cairo lang 2.5.3

#[starknet::contract]
mod MyToken {
    use openzeppelin::token::erc20::ERC20Component;
...

Note that in both cases, the import or use statements link to the latest versions of the libraries rather than the minimum compatible version.

@socket-security
Copy link

socket-security bot commented Feb 21, 2024

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

Package New capabilities Transitives Size Publisher
npm/@types/semver@7.5.7 None 0 23.2 kB types
npm/semver@7.6.0 None 0 94.2 kB npm-cli-ops

View full report↗︎

@ericglau ericglau requested review from a team and martriay February 21, 2024 19:29
Copy link

@martriay martriay left a comment

Choose a reason for hiding this comment

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

looks good!

@github-actions github-actions bot mentioned this pull request Jun 19, 2025
This was referenced Aug 12, 2025
@github-actions github-actions bot mentioned this pull request Aug 20, 2025
@github-actions github-actions bot mentioned this pull request Aug 28, 2025
This was referenced Sep 16, 2025
This was referenced Oct 29, 2025
This was referenced Nov 11, 2025
This was referenced Nov 26, 2025
@github-actions github-actions bot mentioned this pull request Jan 10, 2026
@github-actions github-actions bot mentioned this pull request Jan 27, 2026
@github-actions github-actions bot mentioned this pull request Feb 17, 2026
@github-actions github-actions bot mentioned this pull request Feb 25, 2026
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.

Add Cairo lang and OZ Contracts versions to generated contracts add required OpenZeppelin Contracts version as a comment ?

2 participants