From 2b53f222892a8212da54a3b205c263fb6bb5484d Mon Sep 17 00:00:00 2001 From: andrew Date: Sun, 21 Apr 2024 21:44:12 -0400 Subject: [PATCH 1/2] create release entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9815724c8..85c6e7cb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## 0.12.0 (2024-04-21) + ### Added - before_update and after_update hooks to ERC20Component (#951) From c2b2ab9b36500664ce22c5554cb7d63b6effc060 Mon Sep 17 00:00:00 2001 From: andrew-fleming Date: Mon, 22 Apr 2024 01:47:01 +0000 Subject: [PATCH 2/2] Bump version to 0.12.0 --- README.md | 8 ++++---- Scarb.lock | 2 +- Scarb.toml | 2 +- docs/antora.yml | 2 +- docs/modules/ROOT/pages/access.adoc | 2 +- docs/modules/ROOT/pages/api/access.adoc | 6 +++--- docs/modules/ROOT/pages/api/account.adoc | 10 +++++----- docs/modules/ROOT/pages/api/erc1155.adoc | 12 ++++++------ docs/modules/ROOT/pages/api/erc20.adoc | 10 +++++----- docs/modules/ROOT/pages/api/erc721.adoc | 12 ++++++------ docs/modules/ROOT/pages/api/governance.adoc | 2 +- docs/modules/ROOT/pages/api/introspection.adoc | 4 ++-- docs/modules/ROOT/pages/api/security.adoc | 6 +++--- docs/modules/ROOT/pages/api/upgrades.adoc | 4 ++-- docs/modules/ROOT/pages/api/utilities.adoc | 4 ++-- docs/modules/ROOT/pages/index.adoc | 2 +- docs/modules/ROOT/pages/presets.adoc | 2 +- docs/modules/ROOT/pages/upgrades.adoc | 2 +- docs/modules/ROOT/pages/utils/_class_hashes.adoc | 12 ++++++------ docs/modules/ROOT/pages/wizard.adoc | 2 +- src/access/accesscontrol/accesscontrol.cairo | 2 +- src/access/accesscontrol/dual_accesscontrol.cairo | 2 +- src/access/accesscontrol/interface.cairo | 2 +- src/access/ownable/dual_ownable.cairo | 2 +- src/access/ownable/interface.cairo | 2 +- src/access/ownable/ownable.cairo | 2 +- src/account/account.cairo | 2 +- src/account/dual_account.cairo | 2 +- src/account/dual_eth_account.cairo | 2 +- src/account/eth_account.cairo | 2 +- src/account/interface.cairo | 2 +- src/account/utils.cairo | 2 +- src/account/utils/secp256k1.cairo | 2 +- src/account/utils/signature.cairo | 2 +- src/introspection/interface.cairo | 2 +- src/introspection/src5.cairo | 2 +- src/presets/account.cairo | 2 +- src/presets/erc1155.cairo | 2 +- src/presets/erc20.cairo | 2 +- src/presets/erc721.cairo | 2 +- src/presets/eth_account.cairo | 2 +- src/presets/universal_deployer.cairo | 2 +- src/security/initializable.cairo | 2 +- src/security/pausable.cairo | 2 +- src/security/reentrancyguard.cairo | 2 +- src/token/erc1155/dual1155.cairo | 2 +- src/token/erc1155/dual1155_receiver.cairo | 2 +- src/token/erc1155/erc1155.cairo | 2 +- src/token/erc1155/erc1155_receiver.cairo | 2 +- src/token/erc1155/interface.cairo | 2 +- src/token/erc20/dual20.cairo | 2 +- src/token/erc20/erc20.cairo | 4 ++-- src/token/erc20/extensions/erc20_votes.cairo | 2 +- src/token/erc20/interface.cairo | 2 +- src/token/erc721/dual721.cairo | 2 +- src/token/erc721/dual721_receiver.cairo | 2 +- src/token/erc721/erc721.cairo | 2 +- src/token/erc721/erc721_receiver.cairo | 2 +- src/token/erc721/interface.cairo | 2 +- src/upgrades/interface.cairo | 2 +- src/upgrades/upgradeable.cairo | 2 +- src/utils.cairo | 2 +- src/utils/cryptography/interface.cairo | 2 +- src/utils/cryptography/nonces.cairo | 2 +- src/utils/cryptography/snip12.cairo | 2 +- src/utils/deployments/interface.cairo | 2 +- src/utils/math.cairo | 2 +- src/utils/selectors.cairo | 2 +- src/utils/serde.cairo | 2 +- src/utils/structs/checkpoint.cairo | 2 +- src/utils/structs/storage_array.cairo | 2 +- src/utils/unwrap_and_cast.cairo | 2 +- 72 files changed, 106 insertions(+), 106 deletions(-) diff --git a/README.md b/README.md index bcd26f9e6..cbc7f980f 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Edit `scarb.toml` and add: ```toml [dependencies] -openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.11.0" } +openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.12.0" } ``` Build the project to download it: @@ -105,7 +105,7 @@ mod MyToken { ### Unsupported -[`DualCase` dispatchers](https://docs.openzeppelin.com/contracts-cairo/0.11.0/interfaces#dualcase_dispatchers) rely on Sierra's ability to catch a revert to resume execution. Currently, Starknet live chains (testnets and mainnet) don't implement that behavior. Starknet's testing framework does support it. +[`DualCase` dispatchers](https://docs.openzeppelin.com/contracts-cairo/0.12.0/interfaces#dualcase_dispatchers) rely on Sierra's ability to catch a revert to resume execution. Currently, Starknet live chains (testnets and mainnet) don't implement that behavior. Starknet's testing framework does support it. ## Learn @@ -155,8 +155,8 @@ git clone git@github.com:OpenZeppelin/cairo-contracts.git $ cd cairo-contracts $ scarb build -Compiling lib(openzeppelin) openzeppelin v0.11.0 (~/cairo-contracts/Scarb.toml) -Compiling starknet-contract(openzeppelin) openzeppelin v0.11.0 (~/cairo-contracts/Scarb.toml) +Compiling lib(openzeppelin) openzeppelin v0.12.0 (~/cairo-contracts/Scarb.toml) +Compiling starknet-contract(openzeppelin) openzeppelin v0.12.0 (~/cairo-contracts/Scarb.toml) Finished release target(s) in 16 seconds ``` diff --git a/Scarb.lock b/Scarb.lock index 7d0957241..a2cbcbdce 100644 --- a/Scarb.lock +++ b/Scarb.lock @@ -3,4 +3,4 @@ version = 1 [[package]] name = "openzeppelin" -version = "0.11.0" +version = "0.12.0" diff --git a/Scarb.toml b/Scarb.toml index e8a7426d8..8828a0b94 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -1,6 +1,6 @@ [package] name = "openzeppelin" -version = "0.11.0" +version = "0.12.0" edition = "2023_01" cairo-version = "2.6.3" authors = ["OpenZeppelin Community "] diff --git a/docs/antora.yml b/docs/antora.yml index cd4a7d081..365bfcb3a 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -1,6 +1,6 @@ name: contracts-cairo title: Contracts for Cairo -version: 0.11.0 +version: 0.12.0 nav: - modules/ROOT/nav.adoc asciidoc: diff --git a/docs/modules/ROOT/pages/access.adoc b/docs/modules/ROOT/pages/access.adoc index 98b8341f7..f5901939f 100644 --- a/docs/modules/ROOT/pages/access.adoc +++ b/docs/modules/ROOT/pages/access.adoc @@ -1,4 +1,4 @@ -:ownable-cairo: link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/access/ownable/ownable.cairo[Ownable] +:ownable-cairo: link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/access/ownable/ownable.cairo[Ownable] :sn_keccak: https://docs.starknet.io/documentation/architecture_and_concepts/Cryptography/hash-functions/#starknet_keccak[sn_keccak] = Access diff --git a/docs/modules/ROOT/pages/api/access.adoc b/docs/modules/ROOT/pages/api/access.adoc index 706489c6f..8f1c46748 100644 --- a/docs/modules/ROOT/pages/api/access.adoc +++ b/docs/modules/ROOT/pages/api/access.adoc @@ -20,7 +20,7 @@ assigned each to multiple accounts. [.contract] [[OwnableComponent]] -=== `++OwnableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/access/ownable/ownable.cairo[{github-icon},role=heading-link] +=== `++OwnableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/access/ownable/ownable.cairo[{github-icon},role=heading-link] ```cairo use openzeppelin::access::ownable::OwnableComponent; @@ -268,7 +268,7 @@ Emitted when the ownership is transferred. [.contract] [[IAccessControl]] -=== `++IAccessControl++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/access/accesscontrol/interface.cairo[{github-icon},role=heading-link] +=== `++IAccessControl++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/access/accesscontrol/interface.cairo[{github-icon},role=heading-link] :grant_role: xref:#IAccessControl-grant_role[grant_role] :revoke_role: xref:#IAccessControl-revoke_role[revoke_role] @@ -401,7 +401,7 @@ Emitted when `account` is revoked `role`. [.contract] [[AccessControlComponent]] -=== `++AccessControlComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/access/accesscontrol/accesscontrol.cairo[{github-icon},role=heading-link] +=== `++AccessControlComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/access/accesscontrol/accesscontrol.cairo[{github-icon},role=heading-link] :assert_only_role: xref:#AccessControlComponent-assert_only_role :grant_role: xref:#AccessControlComponent-grant_role[grant_role] diff --git a/docs/modules/ROOT/pages/api/account.adoc b/docs/modules/ROOT/pages/api/account.adoc index d6dc4f099..75f33e700 100644 --- a/docs/modules/ROOT/pages/api/account.adoc +++ b/docs/modules/ROOT/pages/api/account.adoc @@ -12,7 +12,7 @@ include::../utils/_common.adoc[] [.contract] [[ISRC6]] -=== `++ISRC6++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/account/interface.cairo[{github-icon},role=heading-link] +=== `++ISRC6++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/account/interface.cairo[{github-icon},role=heading-link] ```cairo use openzeppelin::account::interface::ISRC6; @@ -65,7 +65,7 @@ Returns the short string `'VALID'` if valid, otherwise it reverts. [.contract] [[AccountComponent]] -=== `++AccountComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/account/account.cairo[{github-icon},role=heading-link] +=== `++AccountComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/account/account.cairo[{github-icon},role=heading-link] :OwnerAdded: xref:AccountComponent-OwnerAdded[OwnerAdded] :OwnerRemoved: xref:AccountComponent-OwnerRemoved[OwnerRemoved] @@ -282,7 +282,7 @@ Emitted when a `public_key` is removed. [.contract] [[EthAccountComponent]] -=== `++EthAccountComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/account/eth_account.cairo[{github-icon},role=heading-link] +=== `++EthAccountComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/account/eth_account.cairo[{github-icon},role=heading-link] :OwnerAdded: xref:EthAccountComponent-OwnerAdded[OwnerAdded] :OwnerRemoved: xref:EthAccountComponent-OwnerRemoved[OwnerRemoved] @@ -505,7 +505,7 @@ Emitted when a `public_key` is removed. [.contract] [[AccountUpgradeable]] -=== `++AccountUpgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/presets/account.cairo[{github-icon},role=heading-link] +=== `++AccountUpgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/presets/account.cairo[{github-icon},role=heading-link] ```cairo use openzeppelin::presets::AccountUpgradeable; @@ -566,7 +566,7 @@ Requirements: [.contract] [[EthAccountUpgradeable]] -=== `++EthAccountUpgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/presets/eth_account.cairo[{github-icon},role=heading-link] +=== `++EthAccountUpgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/presets/eth_account.cairo[{github-icon},role=heading-link] ```cairo use openzeppelin::presets::EthAccountUpgradeable; diff --git a/docs/modules/ROOT/pages/api/erc1155.adoc b/docs/modules/ROOT/pages/api/erc1155.adoc index d1c637e9e..865fb9b8a 100644 --- a/docs/modules/ROOT/pages/api/erc1155.adoc +++ b/docs/modules/ROOT/pages/api/erc1155.adoc @@ -16,7 +16,7 @@ TIP: For an overview of ERC1155, read our xref:erc1155.adoc[ERC1155 guide]. [.contract] [[IERC1155]] -=== `++IERC1155++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/token/erc1155/interface.cairo[{github-icon},role=heading-link] +=== `++IERC1155++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/token/erc1155/interface.cairo[{github-icon},role=heading-link] [.hljs-theme-dark] ```cairo @@ -126,7 +126,7 @@ Emitted when the token URI is updated to `value` for the `id` token. [.contract] [[IERC1155MetadataURI]] -=== `++IERC1155MetadataURI++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/token/erc1155/interface.cairo[{github-icon},role=heading-link] +=== `++IERC1155MetadataURI++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/token/erc1155/interface.cairo[{github-icon},role=heading-link] [.hljs-theme-dark] ```cairo @@ -156,7 +156,7 @@ Returns the Uniform Resource Identifier (URI) for the `token_id` token. [.contract] [[ERC1155Component]] -=== `++ERC1155Component++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/token/erc1155/erc1155.cairo[{github-icon},role=heading-link] +=== `++ERC1155Component++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/token/erc1155/erc1155.cairo[{github-icon},role=heading-link] [.hljs-theme-dark] ```cairo @@ -507,7 +507,7 @@ See <>. [.contract] [[IERC1155Receiver]] -=== `++IERC1155Receiver++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/token/erc1155/interface.cairo[{github-icon},role=heading-link] +=== `++IERC1155Receiver++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/token/erc1155/interface.cairo[{github-icon},role=heading-link] [.hljs-theme-dark] ```cairo @@ -547,7 +547,7 @@ via <> by [.contract] [[ERC1155ReceiverComponent]] -=== `++ERC1155ReceiverComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/token/erc1155/erc1155_receiver.cairo[{github-icon},role=heading-link] +=== `++ERC1155ReceiverComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/token/erc1155/erc1155_receiver.cairo[{github-icon},role=heading-link] [.hljs-theme-dark] ```cairo @@ -624,7 +624,7 @@ Registers the `IERC1155Receiver` interface ID as supported through introspection [.contract] [[ERC1155Upgradeable]] -=== `++ERC1155Upgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/presets/erc1155.cairo[{github-icon},role=heading-link] +=== `++ERC1155Upgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/presets/erc1155.cairo[{github-icon},role=heading-link] ```cairo use openzeppelin::presets::ERC1155; diff --git a/docs/modules/ROOT/pages/api/erc20.adoc b/docs/modules/ROOT/pages/api/erc20.adoc index 0c6c59521..9a0cef17c 100644 --- a/docs/modules/ROOT/pages/api/erc20.adoc +++ b/docs/modules/ROOT/pages/api/erc20.adoc @@ -16,7 +16,7 @@ TIP: For an overview of ERC20, read our {erc20-guide}. [.contract] [[IERC20]] -=== `++IERC20++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/token/erc20/interface.cairo[{github-icon},role=heading-link] +=== `++IERC20++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/token/erc20/interface.cairo[{github-icon},role=heading-link] [.hljs-theme-dark] ```cairo @@ -114,7 +114,7 @@ Emitted when the allowance of a `spender` for an `owner` is set. [.contract] [[IERC20Metadata]] -=== `++IERC20Metadata++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/token/erc20/interface.cairo#L19[{github-icon},role=heading-link] +=== `++IERC20Metadata++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/token/erc20/interface.cairo#L19[{github-icon},role=heading-link] [.hljs-theme-dark] ```cairo @@ -162,7 +162,7 @@ NOTE: This information is only used for _display_ purposes: it in no way affects [.contract] [[ERC20Component]] -=== `++ERC20Component++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/token/erc20/erc20.cairo[{github-icon},role=heading-link] +=== `++ERC20Component++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/token/erc20/erc20.cairo[{github-icon},role=heading-link] [.hljs-theme-dark] ```cairo @@ -460,7 +460,7 @@ See <>. [.contract] [[ERC20VotesComponent]] -=== `++ERC20VotesComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/token/erc20/extensions/erc20_votes.cairo[{github-icon},role=heading-link] +=== `++ERC20VotesComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/token/erc20/extensions/erc20_votes.cairo[{github-icon},role=heading-link] ```cairo use openzeppelin::token::extensions::ERC20VotesComponent; @@ -654,7 +654,7 @@ Emitted when `delegate` votes are updated from `previous_votes` to `new_votes`. [.contract] [[ERC20Upgradeable]] -=== `++ERC20Upgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/presets/erc20.cairo[{github-icon},role=heading-link] +=== `++ERC20Upgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/presets/erc20.cairo[{github-icon},role=heading-link] ```cairo use openzeppelin::presets::ERC20Upgradeable; diff --git a/docs/modules/ROOT/pages/api/erc721.adoc b/docs/modules/ROOT/pages/api/erc721.adoc index e6c41d2c5..afe5e4b63 100644 --- a/docs/modules/ROOT/pages/api/erc721.adoc +++ b/docs/modules/ROOT/pages/api/erc721.adoc @@ -16,7 +16,7 @@ TIP: For an overview of ERC721, read our xref:erc721.adoc[ERC721 guide]. [.contract] [[IERC721]] -=== `++IERC721++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/token/erc721/interface.cairo#L13-L31[{github-icon},role=heading-link] +=== `++IERC721++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/token/erc721/interface.cairo#L13-L31[{github-icon},role=heading-link] [.hljs-theme-dark] ```cairo @@ -135,7 +135,7 @@ Emitted when `token_id` token is transferred from `from` to `to`. [.contract] [[IERC721Metadata]] -=== `++IERC721Metadata++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/token/erc721/interface.cairo#L54-L59[{github-icon},role=heading-link] +=== `++IERC721Metadata++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/token/erc721/interface.cairo#L54-L59[{github-icon},role=heading-link] [.hljs-theme-dark] ```cairo @@ -181,7 +181,7 @@ If the URI is not set for `token_id`, the return value will be an empty `ByteArr [.contract] [[ERC721Component]] -=== `++ERC721Component++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/token/erc721/erc721.cairo#L7[{github-icon},role=heading-link] +=== `++ERC721Component++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/token/erc721/erc721.cairo#L7[{github-icon},role=heading-link] [.hljs-theme-dark] ```cairo @@ -593,7 +593,7 @@ See <>. [.contract] [[IERC721Receiver]] -=== `++IERC721Receiver++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/token/erc721/interface.cairo#L70-L79[{github-icon},role=heading-link] +=== `++IERC721Receiver++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/token/erc721/interface.cairo#L70-L79[{github-icon},role=heading-link] [.hljs-theme-dark] ```cairo @@ -624,7 +624,7 @@ Whenever an IERC721 `token_id` token is transferred to this non-account contract [.contract] [[ERC721ReceiverComponent]] -=== `++ERC721ReceiverComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/token/erc721/erc721_receiver.cairo[{github-icon},role=heading-link] +=== `++ERC721ReceiverComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/token/erc721/erc721_receiver.cairo[{github-icon},role=heading-link] [.hljs-theme-dark] ```cairo @@ -690,7 +690,7 @@ Registers the `IERC721Receiver` interface ID as supported through introspection. [.contract] [[ERC721Upgradeable]] -=== `++ERC721Upgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/presets/erc721.cairo[{github-icon},role=heading-link] +=== `++ERC721Upgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/presets/erc721.cairo[{github-icon},role=heading-link] ```cairo use openzeppelin::presets::ERC721Upgradeable; diff --git a/docs/modules/ROOT/pages/api/governance.adoc b/docs/modules/ROOT/pages/api/governance.adoc index 229af2069..42cd6bfad 100644 --- a/docs/modules/ROOT/pages/api/governance.adoc +++ b/docs/modules/ROOT/pages/api/governance.adoc @@ -8,7 +8,7 @@ Reference of interfaces and utilities related to Governance. [.contract] [[IVotes]] -=== `++IVotes++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/governance/utils/interfaces/votes.cairo[{github-icon},role=heading-link] +=== `++IVotes++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/governance/utils/interfaces/votes.cairo[{github-icon},role=heading-link] [.hljs-theme-dark] ```cairo diff --git a/docs/modules/ROOT/pages/api/introspection.adoc b/docs/modules/ROOT/pages/api/introspection.adoc index 7da0c3135..5963a1909 100644 --- a/docs/modules/ROOT/pages/api/introspection.adoc +++ b/docs/modules/ROOT/pages/api/introspection.adoc @@ -10,7 +10,7 @@ Reference of interfaces and utilities related to https://en.wikipedia.org/wiki/T [.contract] [[ISRC5]] -=== `++ISRC5++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/introspection/interface.cairo#L7[{github-icon},role=heading-link] +=== `++ISRC5++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/introspection/interface.cairo#L7[{github-icon},role=heading-link] ```cairo use openzeppelin::introspection::interface::ISRC5; @@ -44,7 +44,7 @@ on how to compute this ID. [.contract] [[SRC5Component]] -=== `++SRC5Component++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/introspection/src5.cairo[{github-icon},role=heading-link] +=== `++SRC5Component++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/introspection/src5.cairo[{github-icon},role=heading-link] ```cairo use openzeppelin::introspection::src5::SRC5Component; diff --git a/docs/modules/ROOT/pages/api/security.adoc b/docs/modules/ROOT/pages/api/security.adoc index 7995d15e7..767dcda69 100644 --- a/docs/modules/ROOT/pages/api/security.adoc +++ b/docs/modules/ROOT/pages/api/security.adoc @@ -8,7 +8,7 @@ Reference of components, interfaces and utilities found in the library's `securi [.contract] [[InitializableComponent]] -=== `++InitializableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/security/initializable.cairo[{github-icon},role=heading-link] +=== `++InitializableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/security/initializable.cairo[{github-icon},role=heading-link] ```cairo use openzeppelin::security::InitializableComponent; @@ -58,7 +58,7 @@ Requirements: [.contract] [[PausableComponent]] -=== `++PausableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/security/pausable.cairo[{github-icon},role=heading-link] +=== `++PausableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/security/pausable.cairo[{github-icon},role=heading-link] :Paused: xref:PausableComponent-Paused[Paused] :Unpaused: xref:PausableComponent-Unpaused[Unpaused] @@ -163,7 +163,7 @@ Emitted when the contract is unpaused by `account`. [.contract] [[ReentrancyGuardComponent]] -=== `++ReentrancyGuardComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/security/reentrancyguard.cairo[{github-icon},role=heading-link] +=== `++ReentrancyGuardComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/security/reentrancyguard.cairo[{github-icon},role=heading-link] ```cairo use openzeppelin::security::ReentrancyGuardComponent; diff --git a/docs/modules/ROOT/pages/api/upgrades.adoc b/docs/modules/ROOT/pages/api/upgrades.adoc index 62d7f64e8..c24bb8bfb 100644 --- a/docs/modules/ROOT/pages/api/upgrades.adoc +++ b/docs/modules/ROOT/pages/api/upgrades.adoc @@ -9,7 +9,7 @@ Reference of interfaces and utilities related to upgradeability. [.contract] [[IUpgradeable]] -=== `++IUpgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/upgrades/interface.cairo#L3[{github-icon},role=heading-link] +=== `++IUpgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/upgrades/interface.cairo#L3[{github-icon},role=heading-link] :Upgraded: xref:UpgradeableComponent-Upgraded[Upgraded] @@ -38,7 +38,7 @@ NOTE: This function is usually protected by an xref:access.adoc[Access Control] [.contract] [[UpgradeableComponent]] -=== `++UpgradeableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/upgrades/upgradeable.cairo[{github-icon},role=heading-link] +=== `++UpgradeableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/upgrades/upgradeable.cairo[{github-icon},role=heading-link] ```cairo use openzeppelin::upgrades::upgradeable::UpgradeableComponent; diff --git a/docs/modules/ROOT/pages/api/utilities.adoc b/docs/modules/ROOT/pages/api/utilities.adoc index 840b1ffcd..0696ac3b1 100644 --- a/docs/modules/ROOT/pages/api/utilities.adoc +++ b/docs/modules/ROOT/pages/api/utilities.adoc @@ -261,7 +261,7 @@ NOTE: `T` is a generic value matching different numeric implementations. use openzeppelin::utils::selectors; ``` -:selectors: https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/utils/selectors.cairo[selectors.cairo] +:selectors: https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/utils/selectors.cairo[selectors.cairo] Module containing constants matching multiple selectors used through the library. To see the full list of selectors, see {selectors}. @@ -532,7 +532,7 @@ See xref:#constants[`openzeppelin::tests::utils::constants`]. use openzeppelin::tests::utils::constants; ``` -:constants: https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/tests/utils/constants.cairo[constants.cairo] +:constants: https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/tests/utils/constants.cairo[constants.cairo] Module containing constants that are repeatedly used among tests. To see the full list, see {constants}. diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index df9a942f9..f3372e5b9 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -57,7 +57,7 @@ Install the library by declaring it as a dependency in the project's `Scarb.toml [,text] ---- [dependencies] -openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.11.0" } +openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.12.0" } ---- WARNING: Make sure the tag matches the target release. diff --git a/docs/modules/ROOT/pages/presets.adoc b/docs/modules/ROOT/pages/presets.adoc index 143f030ea..108b252d8 100644 --- a/docs/modules/ROOT/pages/presets.adoc +++ b/docs/modules/ROOT/pages/presets.adoc @@ -53,7 +53,7 @@ TIP: {starkli} class-hash command can be used to compute the class hash from a S :setup_project: xref:index.adoc#set_up_your_project[setting up a project] :install_lib: xref:index.adoc#install the_library[installing the Contracts for Cairo library] -:presets_dir: link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/presets[presets directory] +:presets_dir: link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/presets[presets directory] These preset contracts are ready-to-deploy which means they should already be declared on the Sepolia network. Simply deploy the preset class hash and add the appropriate constructor arguments. diff --git a/docs/modules/ROOT/pages/upgrades.adoc b/docs/modules/ROOT/pages/upgrades.adoc index 290614f93..846be84f0 100644 --- a/docs/modules/ROOT/pages/upgrades.adoc +++ b/docs/modules/ROOT/pages/upgrades.adoc @@ -1,7 +1,7 @@ :contract_classes: https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/contract-classes/[Contract Classes] :class_hash: https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/class-hash/[class hash] :replace_class_syscall: https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/system-calls-cairo1/#replace_class[replace_class] -:upgradeable: https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.11.0/src/upgrades/upgradeable.cairo[Upgradeable] +:upgradeable: https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.12.0/src/upgrades/upgradeable.cairo[Upgradeable] :ownable: xref:access.adoc#ownership_and_ownable[Ownable] :i_upgradeable: xref:api/upgrades.adoc#IUpgradeable[IUpgradeable] :library_calls: https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/system-calls-cairo1/#library_call[library calls] diff --git a/docs/modules/ROOT/pages/utils/_class_hashes.adoc b/docs/modules/ROOT/pages/utils/_class_hashes.adoc index 48d6f83c9..98fce5fc9 100644 --- a/docs/modules/ROOT/pages/utils/_class_hashes.adoc +++ b/docs/modules/ROOT/pages/utils/_class_hashes.adoc @@ -2,12 +2,12 @@ :class-hash-cairo-version: https://crates.io/crates/cairo-lang-compiler/2.6.3[cairo 2.6.3] // Class Hashes -:AccountUpgradeable-class-hash: 0x0450f568a8cb6ea1bcce446355e8a1c2e5852a6b8dc3536f495cdceb62e8a7e2 -:ERC1155Upgradeable-class-hash: 0x0165bfb888913ab8adda83e5d859fd1c283460d51f8f694da00c121b65a6fcc8 -:ERC20Upgradeable-class-hash: 0x06aff5bf77ad88f5ccadc80360e3dcdd12e1a8009160458296b8aac9de2240ff -:ERC721Upgradeable-class-hash: 0x04cd23b9cf1f3206bef278fe4a4cf6c34e88a7ae20d85884e3d6a1bf8df06693 -:EthAccountUpgradeable-class-hash: 0x078ca36b65e3790d9a1b8474221a52b4c600efe5c55e5d1e972a61f69365a151 -:UniversalDeployer-class-hash: 0x00c46a81caa79e379148caaceb3db2e7c6d59c89a47a53b51d59494d65233e87 +:ERC20Upgradeable-class-hash: 0x040b9e69e14ddc34a98ec8133c80807c144b818bc6cbf5a119d8f62535258142 +:ERC721Upgradeable-class-hash: 0x04bb176e91b55c87c6e6b1eafd725cebe4514a48f1eec34870c65081de214ef4 +:ERC1155Upgradeable-class-hash: 0x017baa69866decbb1ac5e6d5ef2e69b7d5dd7113111a8cc51a48f01854df571f +:AccountUpgradeable-class-hash: 0x01e60c8722677cfb7dd8dbea5be86c09265db02cdfe77113e77da7d44c017388 +:EthAccountUpgradeable-class-hash: 0x042ac0903af3356a92bf61d63a46bb8db7e5f449ad7f8f4e3f1a604223f9c963 +:UniversalDeployer-class-hash: 0x0536e18e3e9820b48e0477e83e0a4d6d923ccddc06deb61585dfd7402dd40733 // Presets page :presets-page: xref:presets.adoc[Sierra class hash] diff --git a/docs/modules/ROOT/pages/wizard.adoc b/docs/modules/ROOT/pages/wizard.adoc index a4ea5cf91..af877b277 100644 --- a/docs/modules/ROOT/pages/wizard.adoc +++ b/docs/modules/ROOT/pages/wizard.adoc @@ -10,5 +10,5 @@ NOTE: We strongly recommend checking the xref:components.adoc[Components] sectio ++++ - + ++++ diff --git a/src/access/accesscontrol/accesscontrol.cairo b/src/access/accesscontrol/accesscontrol.cairo index ba2fd5132..9219a4dfd 100644 --- a/src/access/accesscontrol/accesscontrol.cairo +++ b/src/access/accesscontrol/accesscontrol.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (access/accesscontrol/accesscontrol.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (access/accesscontrol/accesscontrol.cairo) /// # AccessControl Component /// diff --git a/src/access/accesscontrol/dual_accesscontrol.cairo b/src/access/accesscontrol/dual_accesscontrol.cairo index 6c67bb71d..3785f2029 100644 --- a/src/access/accesscontrol/dual_accesscontrol.cairo +++ b/src/access/accesscontrol/dual_accesscontrol.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (access/accesscontrol/dual_accesscontrol.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (access/accesscontrol/dual_accesscontrol.cairo) use openzeppelin::utils::UnwrapAndCast; use openzeppelin::utils::selectors; diff --git a/src/access/accesscontrol/interface.cairo b/src/access/accesscontrol/interface.cairo index 628bfd432..50c0df9b8 100644 --- a/src/access/accesscontrol/interface.cairo +++ b/src/access/accesscontrol/interface.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (access/accesscontrol/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (access/accesscontrol/interface.cairo) use starknet::ContractAddress; diff --git a/src/access/ownable/dual_ownable.cairo b/src/access/ownable/dual_ownable.cairo index 312dddc1c..3ffa8c38b 100644 --- a/src/access/ownable/dual_ownable.cairo +++ b/src/access/ownable/dual_ownable.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (access/ownable/dual_ownable.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (access/ownable/dual_ownable.cairo) use openzeppelin::utils::UnwrapAndCast; use openzeppelin::utils::selectors; diff --git a/src/access/ownable/interface.cairo b/src/access/ownable/interface.cairo index 429410886..b50f6254f 100644 --- a/src/access/ownable/interface.cairo +++ b/src/access/ownable/interface.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (access/ownable/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (access/ownable/interface.cairo) use starknet::ContractAddress; diff --git a/src/access/ownable/ownable.cairo b/src/access/ownable/ownable.cairo index 5cf39e81e..e30974535 100644 --- a/src/access/ownable/ownable.cairo +++ b/src/access/ownable/ownable.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (access/ownable/ownable.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (access/ownable/ownable.cairo) /// # Ownable Component /// diff --git a/src/account/account.cairo b/src/account/account.cairo index bc2527c16..b962a1055 100644 --- a/src/account/account.cairo +++ b/src/account/account.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (account/account.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (account/account.cairo) /// # Account Component /// diff --git a/src/account/dual_account.cairo b/src/account/dual_account.cairo index 888c96102..024d1582c 100644 --- a/src/account/dual_account.cairo +++ b/src/account/dual_account.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (account/dual_account.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (account/dual_account.cairo) use openzeppelin::utils::UnwrapAndCast; use openzeppelin::utils::selectors; diff --git a/src/account/dual_eth_account.cairo b/src/account/dual_eth_account.cairo index be0f44ebd..fec1d1cc1 100644 --- a/src/account/dual_eth_account.cairo +++ b/src/account/dual_eth_account.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (account/dual_eth_account.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (account/dual_eth_account.cairo) use openzeppelin::account::interface::EthPublicKey; use openzeppelin::account::utils::secp256k1::Secp256k1PointSerde; diff --git a/src/account/eth_account.cairo b/src/account/eth_account.cairo index 022d67122..9146fc311 100644 --- a/src/account/eth_account.cairo +++ b/src/account/eth_account.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (account/eth_account.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (account/eth_account.cairo) /// # EthAccount Component /// diff --git a/src/account/interface.cairo b/src/account/interface.cairo index 4270e83a2..aa46dc163 100644 --- a/src/account/interface.cairo +++ b/src/account/interface.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (account/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (account/interface.cairo) use openzeppelin::account::utils::secp256k1::Secp256k1PointSerde; use starknet::ContractAddress; diff --git a/src/account/utils.cairo b/src/account/utils.cairo index b67a1aa84..f933ff6be 100644 --- a/src/account/utils.cairo +++ b/src/account/utils.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (account/utils.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (account/utils.cairo) mod secp256k1; mod signature; diff --git a/src/account/utils/secp256k1.cairo b/src/account/utils/secp256k1.cairo index eff210d72..50dc79c34 100644 --- a/src/account/utils/secp256k1.cairo +++ b/src/account/utils/secp256k1.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (account/utils/secp256k1.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (account/utils/secp256k1.cairo) use core::fmt::{Debug, Formatter, Error}; use starknet::SyscallResultTrait; diff --git a/src/account/utils/signature.cairo b/src/account/utils/signature.cairo index 3c3372add..24abce20b 100644 --- a/src/account/utils/signature.cairo +++ b/src/account/utils/signature.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (account/utils/signature.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (account/utils/signature.cairo) use ecdsa::check_ecdsa_signature; use openzeppelin::account::interface::EthPublicKey; diff --git a/src/introspection/interface.cairo b/src/introspection/interface.cairo index 1dedb61a6..d3ccdfaba 100644 --- a/src/introspection/interface.cairo +++ b/src/introspection/interface.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (introspection/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (introspection/interface.cairo) const ISRC5_ID: felt252 = 0x3f918d17e5ee77373b56385708f855659a07f75997f365cf87748628532a055; diff --git a/src/introspection/src5.cairo b/src/introspection/src5.cairo index 1ebb78074..2eab291dd 100644 --- a/src/introspection/src5.cairo +++ b/src/introspection/src5.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (introspection/src5.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (introspection/src5.cairo) /// # SRC5 Component /// diff --git a/src/presets/account.cairo b/src/presets/account.cairo index e84413dc3..3377eaeff 100644 --- a/src/presets/account.cairo +++ b/src/presets/account.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (presets/account.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (presets/account.cairo) /// # Account Preset /// diff --git a/src/presets/erc1155.cairo b/src/presets/erc1155.cairo index 467f064f0..b0ac768e5 100644 --- a/src/presets/erc1155.cairo +++ b/src/presets/erc1155.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (presets/erc1155.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (presets/erc1155.cairo) /// # ERC1155Upgradeable Preset /// diff --git a/src/presets/erc20.cairo b/src/presets/erc20.cairo index 68a99e3b2..55e59b325 100644 --- a/src/presets/erc20.cairo +++ b/src/presets/erc20.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (presets/erc20.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (presets/erc20.cairo) /// # ERC20 Preset /// diff --git a/src/presets/erc721.cairo b/src/presets/erc721.cairo index 1d96b2878..8d57b1f65 100644 --- a/src/presets/erc721.cairo +++ b/src/presets/erc721.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (presets/erc721.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (presets/erc721.cairo) /// # ERC721 Preset /// diff --git a/src/presets/eth_account.cairo b/src/presets/eth_account.cairo index f54133ce1..116e28447 100644 --- a/src/presets/eth_account.cairo +++ b/src/presets/eth_account.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (presets/eth_account.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (presets/eth_account.cairo) /// # EthAccount Preset /// diff --git a/src/presets/universal_deployer.cairo b/src/presets/universal_deployer.cairo index 31586ae82..9095cad2f 100644 --- a/src/presets/universal_deployer.cairo +++ b/src/presets/universal_deployer.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (presets/universal_deployer.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (presets/universal_deployer.cairo) /// # UniversalDeployerContract Preset /// diff --git a/src/security/initializable.cairo b/src/security/initializable.cairo index 5ff0c9de6..1fbe0fe3e 100644 --- a/src/security/initializable.cairo +++ b/src/security/initializable.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (security/initializable.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (security/initializable.cairo) /// # Initializable Component /// diff --git a/src/security/pausable.cairo b/src/security/pausable.cairo index 8a1186b16..ac6994657 100644 --- a/src/security/pausable.cairo +++ b/src/security/pausable.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (security/pausable.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (security/pausable.cairo) /// # Pausable Component /// diff --git a/src/security/reentrancyguard.cairo b/src/security/reentrancyguard.cairo index d40973d83..a184e7dcc 100644 --- a/src/security/reentrancyguard.cairo +++ b/src/security/reentrancyguard.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (security/reentrancyguard.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (security/reentrancyguard.cairo) /// # ReentrancyGuard Component /// diff --git a/src/token/erc1155/dual1155.cairo b/src/token/erc1155/dual1155.cairo index 00f65f04e..238b738cf 100644 --- a/src/token/erc1155/dual1155.cairo +++ b/src/token/erc1155/dual1155.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (token/erc1155/dual1155.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (token/erc1155/dual1155.cairo) use openzeppelin::utils::UnwrapAndCast; use openzeppelin::utils::selectors; diff --git a/src/token/erc1155/dual1155_receiver.cairo b/src/token/erc1155/dual1155_receiver.cairo index 32a8f3b30..5d020cbe8 100644 --- a/src/token/erc1155/dual1155_receiver.cairo +++ b/src/token/erc1155/dual1155_receiver.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (token/erc1155/dual1155_receiver.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (token/erc1155/dual1155_receiver.cairo) use openzeppelin::utils::UnwrapAndCast; use openzeppelin::utils::selectors; diff --git a/src/token/erc1155/erc1155.cairo b/src/token/erc1155/erc1155.cairo index fba778131..f70751bda 100644 --- a/src/token/erc1155/erc1155.cairo +++ b/src/token/erc1155/erc1155.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (token/erc1155/erc1155.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (token/erc1155/erc1155.cairo) /// # ERC1155 Component /// diff --git a/src/token/erc1155/erc1155_receiver.cairo b/src/token/erc1155/erc1155_receiver.cairo index 040659e23..fa19e0c1b 100644 --- a/src/token/erc1155/erc1155_receiver.cairo +++ b/src/token/erc1155/erc1155_receiver.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (token/erc1155/erc1155_receiver.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (token/erc1155/erc1155_receiver.cairo) /// # ERC1155Receiver Component /// diff --git a/src/token/erc1155/interface.cairo b/src/token/erc1155/interface.cairo index 742aa8c7b..7ee9212e9 100644 --- a/src/token/erc1155/interface.cairo +++ b/src/token/erc1155/interface.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (token/erc1155/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (token/erc1155/interface.cairo) use starknet::ContractAddress; diff --git a/src/token/erc20/dual20.cairo b/src/token/erc20/dual20.cairo index 6da34675d..7b5110b4e 100644 --- a/src/token/erc20/dual20.cairo +++ b/src/token/erc20/dual20.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (token/erc20/dual20.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (token/erc20/dual20.cairo) use openzeppelin::utils::UnwrapAndCast; use openzeppelin::utils::selectors; diff --git a/src/token/erc20/erc20.cairo b/src/token/erc20/erc20.cairo index 7f36f92ef..10003fc91 100644 --- a/src/token/erc20/erc20.cairo +++ b/src/token/erc20/erc20.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (token/erc20/erc20.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (token/erc20/erc20.cairo) use starknet::ContractAddress; @@ -9,7 +9,7 @@ use starknet::ContractAddress; /// non-standard implementations that can be used to create an ERC20 contract. This /// component is agnostic regarding how tokens are created, which means that developers /// must create their own token distribution mechanism. -/// See [the documentation](https://docs.openzeppelin.com/contracts-cairo/0.11.0/guides/erc20-supply) +/// See [the documentation](https://docs.openzeppelin.com/contracts-cairo/0.12.0/guides/erc20-supply) /// for examples. #[starknet::component] mod ERC20Component { diff --git a/src/token/erc20/extensions/erc20_votes.cairo b/src/token/erc20/extensions/erc20_votes.cairo index 580ecdde7..d890b5e8b 100644 --- a/src/token/erc20/extensions/erc20_votes.cairo +++ b/src/token/erc20/extensions/erc20_votes.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (token/erc20/extensions/erc20_votes.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (token/erc20/extensions/erc20_votes.cairo) use core::hash::HashStateExTrait; use hash::{HashStateTrait, Hash}; diff --git a/src/token/erc20/interface.cairo b/src/token/erc20/interface.cairo index 4647ee6f8..6f62e142d 100644 --- a/src/token/erc20/interface.cairo +++ b/src/token/erc20/interface.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (token/erc20/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (token/erc20/interface.cairo) use openzeppelin::utils::structs::checkpoint::Checkpoint; use starknet::ContractAddress; diff --git a/src/token/erc721/dual721.cairo b/src/token/erc721/dual721.cairo index e9008a17a..f178ea948 100644 --- a/src/token/erc721/dual721.cairo +++ b/src/token/erc721/dual721.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (token/erc721/dual721.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (token/erc721/dual721.cairo) use openzeppelin::utils::UnwrapAndCast; use openzeppelin::utils::selectors; diff --git a/src/token/erc721/dual721_receiver.cairo b/src/token/erc721/dual721_receiver.cairo index 9d40c1b0e..683169668 100644 --- a/src/token/erc721/dual721_receiver.cairo +++ b/src/token/erc721/dual721_receiver.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (token/erc721/dual721_receiver.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (token/erc721/dual721_receiver.cairo) use openzeppelin::utils::UnwrapAndCast; use openzeppelin::utils::selectors; diff --git a/src/token/erc721/erc721.cairo b/src/token/erc721/erc721.cairo index 2e5d05bf1..807d7bb64 100644 --- a/src/token/erc721/erc721.cairo +++ b/src/token/erc721/erc721.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (token/erc721/erc721.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (token/erc721/erc721.cairo) /// # ERC721 Component /// diff --git a/src/token/erc721/erc721_receiver.cairo b/src/token/erc721/erc721_receiver.cairo index 67f41d134..e5b0a2b7c 100644 --- a/src/token/erc721/erc721_receiver.cairo +++ b/src/token/erc721/erc721_receiver.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (token/erc721/erc721_receiver.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (token/erc721/erc721_receiver.cairo) /// # ERC721Receiver Component /// diff --git a/src/token/erc721/interface.cairo b/src/token/erc721/interface.cairo index 38261a388..237900eaa 100644 --- a/src/token/erc721/interface.cairo +++ b/src/token/erc721/interface.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (token/erc721/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (token/erc721/interface.cairo) use starknet::ContractAddress; diff --git a/src/upgrades/interface.cairo b/src/upgrades/interface.cairo index 1b0fad4b4..f552a431f 100644 --- a/src/upgrades/interface.cairo +++ b/src/upgrades/interface.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (upgrades/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (upgrades/interface.cairo) use starknet::ClassHash; diff --git a/src/upgrades/upgradeable.cairo b/src/upgrades/upgradeable.cairo index c7ea59ea8..653d57db0 100644 --- a/src/upgrades/upgradeable.cairo +++ b/src/upgrades/upgradeable.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (upgrades/upgradeable.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (upgrades/upgradeable.cairo) /// # Upgradeable Component /// diff --git a/src/utils.cairo b/src/utils.cairo index 743add2b3..c440958a2 100644 --- a/src/utils.cairo +++ b/src/utils.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (utils.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (utils.cairo) mod cryptography; mod deployments; diff --git a/src/utils/cryptography/interface.cairo b/src/utils/cryptography/interface.cairo index 868c1f950..435ea0f90 100644 --- a/src/utils/cryptography/interface.cairo +++ b/src/utils/cryptography/interface.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (utils/cryptography/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (utils/cryptography/interface.cairo) use starknet::ContractAddress; diff --git a/src/utils/cryptography/nonces.cairo b/src/utils/cryptography/nonces.cairo index 28b687af3..e08c91846 100644 --- a/src/utils/cryptography/nonces.cairo +++ b/src/utils/cryptography/nonces.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (utils/cryptography/nonces.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (utils/cryptography/nonces.cairo) #[starknet::component] mod NoncesComponent { diff --git a/src/utils/cryptography/snip12.cairo b/src/utils/cryptography/snip12.cairo index b6948f7e9..9ad2b0a77 100644 --- a/src/utils/cryptography/snip12.cairo +++ b/src/utils/cryptography/snip12.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (utils/cryptography/snip12.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (utils/cryptography/snip12.cairo) use core::hash::HashStateExTrait; use hash::{HashStateTrait, Hash}; diff --git a/src/utils/deployments/interface.cairo b/src/utils/deployments/interface.cairo index c8d6faa47..111880705 100644 --- a/src/utils/deployments/interface.cairo +++ b/src/utils/deployments/interface.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (utils/universal_deployer/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (utils/universal_deployer/interface.cairo) use starknet::ClassHash; use starknet::ContractAddress; diff --git a/src/utils/math.cairo b/src/utils/math.cairo index d57e75e56..77ab58b04 100644 --- a/src/utils/math.cairo +++ b/src/utils/math.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (utils/math.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (utils/math.cairo) use traits::Into; diff --git a/src/utils/selectors.cairo b/src/utils/selectors.cairo index d010549da..68657e99a 100644 --- a/src/utils/selectors.cairo +++ b/src/utils/selectors.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (utils/selectors.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (utils/selectors.cairo) // // AccessControl diff --git a/src/utils/serde.cairo b/src/utils/serde.cairo index 5259e3a42..d7485fd6e 100644 --- a/src/utils/serde.cairo +++ b/src/utils/serde.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (utils/serde.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (utils/serde.cairo) trait SerializedAppend { fn append_serde(ref self: Array, value: T); diff --git a/src/utils/structs/checkpoint.cairo b/src/utils/structs/checkpoint.cairo index 8a9a60f14..cd9fff2f2 100644 --- a/src/utils/structs/checkpoint.cairo +++ b/src/utils/structs/checkpoint.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (utils/structs/checkpoint.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (utils/structs/checkpoint.cairo) use integer::u32_sqrt; use openzeppelin::utils::math; diff --git a/src/utils/structs/storage_array.cairo b/src/utils/structs/storage_array.cairo index 4c3680b09..1a01e07ac 100644 --- a/src/utils/structs/storage_array.cairo +++ b/src/utils/structs/storage_array.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (utils/structs/storage_array.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (utils/structs/storage_array.cairo) use hash::{HashStateExTrait, HashStateTrait}; use poseidon::PoseidonTrait; diff --git a/src/utils/unwrap_and_cast.cairo b/src/utils/unwrap_and_cast.cairo index c4df68890..ca208a151 100644 --- a/src/utils/unwrap_and_cast.cairo +++ b/src/utils/unwrap_and_cast.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.11.0 (utils/unwrap_and_cast.cairo) +// OpenZeppelin Contracts for Cairo v0.12.0 (utils/unwrap_and_cast.cairo) use starknet::SyscallResult; use starknet::SyscallResultTrait;