From 861fc416f87addbe23a3b47f9d19ab27c10d5dc8 Mon Sep 17 00:00:00 2001 From: Eric Nordelo Date: Fri, 9 Feb 2024 21:00:35 +0100 Subject: [PATCH] Release v0.9.0 (#909) * feat: update CHANGELOG * feat: update CHANGELOG * fix: sed regex * Bump version to 0.9.0 * feat: update class hash * Update .github/workflows/prepare-release.yml Co-authored-by: Andrew Fleming --------- Co-authored-by: ericnordelo Co-authored-by: Andrew Fleming --- .github/workflows/prepare-release.yml | 3 ++- CHANGELOG.md | 5 +++-- 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/erc20.adoc | 8 ++++---- docs/modules/ROOT/pages/api/erc721.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/index.adoc | 2 +- docs/modules/ROOT/pages/upgrades.adoc | 2 +- docs/modules/ROOT/pages/utilities.adoc | 4 ++-- docs/modules/ROOT/pages/utils/_class_hashes.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/dual_src5.cairo | 2 +- src/introspection/interface.cairo | 2 +- src/introspection/src5.cairo | 2 +- src/presets/account.cairo | 2 +- src/presets/erc20.cairo | 2 +- src/presets/erc721.cairo | 2 +- src/presets/eth_account.cairo | 2 +- src/security/initializable.cairo | 2 +- src/security/pausable.cairo | 2 +- src/security/reentrancyguard.cairo | 2 +- src/token/erc20/dual20.cairo | 2 +- src/token/erc20/erc20.cairo | 4 ++-- 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/selectors.cairo | 2 +- src/utils/serde.cairo | 2 +- src/utils/unwrap_and_cast.cairo | 2 +- 56 files changed, 77 insertions(+), 75 deletions(-) diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 8246eaac3..7ab2c115f 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -24,7 +24,8 @@ jobs: run: | echo "Current version: $CURRENT_VERSION" echo "New version: $NEW_VERSION" - find . -type f -not -path '*/\.*' -not -path './CHANGELOG.md' -not -path './docs/package-lock.json' -not -path './RELEASING.md' -exec sed -i "s/$CURRENT_VERSION/$NEW_VERSION/g" {} + + ESCAPED_CURRENT_VERSION=$(echo $CURRENT_VERSION | sed 's/\./\\./g') + find . -type f -not -path '*/\.*' -not -path './CHANGELOG.md' -not -path './docs/package-lock.json' -not -path './RELEASING.md' -exec sed -i "s/$ESCAPED_CURRENT_VERSION/$NEW_VERSION/g" {} + - name: Auto-commit changes uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a #v4.16.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index a73856f1c..3e77df989 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.9.0 (2024-02-08) + ### Added - EthAccount component and preset (#853) @@ -18,7 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump scarb to v2.4.4 (#853) - Bump scarb to v2.5.3 (#898) - OwnershipTransferred event args are indexed (#809) - + ### Removed - Non standard increase_allowance and decrease_allowance functions in ERC20 contract (#881) @@ -42,4 +44,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Support higher tx versions in Account (#858) - Bump scarb to v2.4.1 (#858) - Add security section to Upgrades docs (#861) - \ No newline at end of file diff --git a/README.md b/README.md index 288c124b9..feafcbc56 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.8.1" } +openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.9.0" } ``` Build the project to download it: @@ -106,7 +106,7 @@ mod MyToken { ### Unsupported -[`DualCase` dispatchers](https://docs.openzeppelin.com/contracts-cairo/0.8.1/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.9.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 @@ -156,8 +156,8 @@ git clone git@github.com:OpenZeppelin/cairo-contracts.git $ cd cairo-contracts $ scarb build -Compiling lib(openzeppelin) openzeppelin v0.8.1 (~/cairo-contracts/Scarb.toml) -Compiling starknet-contract(openzeppelin) openzeppelin v0.8.1 (~/cairo-contracts/Scarb.toml) +Compiling lib(openzeppelin) openzeppelin v0.9.0 (~/cairo-contracts/Scarb.toml) +Compiling starknet-contract(openzeppelin) openzeppelin v0.9.0 (~/cairo-contracts/Scarb.toml) Finished release target(s) in 16 seconds ``` diff --git a/Scarb.lock b/Scarb.lock index b2c02f8ff..13371a5a0 100644 --- a/Scarb.lock +++ b/Scarb.lock @@ -3,4 +3,4 @@ version = 1 [[package]] name = "openzeppelin" -version = "0.8.1" +version = "0.9.0" diff --git a/Scarb.toml b/Scarb.toml index 2d98bb7a7..3b5fb0227 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -1,6 +1,6 @@ [package] name = "openzeppelin" -version = "0.8.1" +version = "0.9.0" edition = "2023_01" cairo-version = "2.5.3" authors = ["OpenZeppelin Community "] diff --git a/docs/antora.yml b/docs/antora.yml index 1de7814ca..3c4ffb147 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -1,6 +1,6 @@ name: contracts-cairo title: Contracts for Cairo -version: 0.8.1 +version: 0.9.0 nav: - modules/ROOT/nav.adoc asciidoc: diff --git a/docs/modules/ROOT/pages/access.adoc b/docs/modules/ROOT/pages/access.adoc index 997f22b2e..1ed423638 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.8.1/src/access/ownable/ownable.cairo[Ownable] +:ownable-cairo: link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.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 bbb140ff0..f30918c5a 100644 --- a/docs/modules/ROOT/pages/api/access.adoc +++ b/docs/modules/ROOT/pages/api/access.adoc @@ -18,7 +18,7 @@ assigned each to multiple accounts. [.contract] [[OwnableComponent]] -=== `++OwnableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.8.1/src/access/ownable/ownable.cairo[{github-icon},role=heading-link] +=== `++OwnableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/access/ownable/ownable.cairo[{github-icon},role=heading-link] ```javascript use openzeppelin::access::ownable::OwnableComponent; @@ -257,7 +257,7 @@ Emitted when the ownership is transferred. [.contract] [[IAccessControl]] -=== `++IAccessControl++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.8.1/src/access/accesscontrol/interface.cairo[{github-icon},role=heading-link] +=== `++IAccessControl++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.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] @@ -390,7 +390,7 @@ Emitted when `account` is revoked `role`. [.contract] [[AccessControlComponent]] -=== `++AccessControlComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.8.1/src/access/accesscontrol/accesscontrol.cairo[{github-icon},role=heading-link] +=== `++AccessControlComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.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 aabb1a2e3..897a2bac5 100644 --- a/docs/modules/ROOT/pages/api/account.adoc +++ b/docs/modules/ROOT/pages/api/account.adoc @@ -10,7 +10,7 @@ Reference of interfaces, presets, and utilities related to account contracts. [.contract] [[ISRC6]] -=== `++ISRC6++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.8.1/src/account/interface.cairo[{github-icon},role=heading-link] +=== `++ISRC6++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/account/interface.cairo[{github-icon},role=heading-link] ```javascript use openzeppelin::account::interface::ISRC6; @@ -63,7 +63,7 @@ Returns the short string `'VALID'` if valid, otherwise it reverts. [.contract] [[AccountComponent]] -=== `++AccountComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.8.1/src/account/account.cairo[{github-icon},role=heading-link] +=== `++AccountComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/account/account.cairo[{github-icon},role=heading-link] :OwnerAdded: xref:AccountComponent-OwnerAdded[OwnerAdded] :OwnerRemoved: xref:AccountComponent-OwnerRemoved[OwnerRemoved] @@ -263,7 +263,7 @@ Emitted when a `public_key` is removed. [.contract] [[EthAccountComponent]] -=== `++EthAccountComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.8.1/src/account/eth_account.cairo[{github-icon},role=heading-link] +=== `++EthAccountComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/account/eth_account.cairo[{github-icon},role=heading-link] :OwnerAdded: xref:EthAccountComponent-OwnerAdded[OwnerAdded] :OwnerRemoved: xref:EthAccountComponent-OwnerRemoved[OwnerRemoved] @@ -469,7 +469,7 @@ Emitted when a `public_key` is removed. [.contract] [[Account]] -=== `++Account++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.8.1/src/presets/account.cairo[{github-icon},role=heading-link] +=== `++Account++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/presets/account.cairo[{github-icon},role=heading-link] ```javascript use openzeppelin::presets::Account; @@ -519,7 +519,7 @@ Sets the account `public_key` and registers the interfaces the contract supports [.contract] [[EthAccountUpgradeable]] -=== `++EthAccountUpgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.8.1/src/presets/eth_account.cairo[{github-icon},role=heading-link] +=== `++EthAccountUpgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/presets/eth_account.cairo[{github-icon},role=heading-link] ```javascript use openzeppelin::presets::EthAccountUpgradeable; diff --git a/docs/modules/ROOT/pages/api/erc20.adoc b/docs/modules/ROOT/pages/api/erc20.adoc index 095b072e7..66c84fca3 100644 --- a/docs/modules/ROOT/pages/api/erc20.adoc +++ b/docs/modules/ROOT/pages/api/erc20.adoc @@ -14,7 +14,7 @@ TIP: For an overview of ERC20, read our {erc20-guide}. [.contract] [[IERC20]] -=== `++IERC20++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.8.1/src/token/erc20/interface.cairo[{github-icon},role=heading-link] +=== `++IERC20++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/token/erc20/interface.cairo[{github-icon},role=heading-link] [.hljs-theme-dark] ```javascript @@ -112,7 +112,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.8.1/src/token/erc20/interface.cairo#L19[{github-icon},role=heading-link] +=== `++IERC20Metadata++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/token/erc20/interface.cairo#L19[{github-icon},role=heading-link] [.hljs-theme-dark] ```javascript @@ -160,7 +160,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.8.1/src/token/erc20/erc20.cairo[{github-icon},role=heading-link] +=== `++ERC20Component++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/token/erc20/erc20.cairo[{github-icon},role=heading-link] [.hljs-theme-dark] ```javascript @@ -407,7 +407,7 @@ See <>. [.contract] [[ERC20]] -=== `++ERC20++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.8.1/src/presets/erc20.cairo[{github-icon},role=heading-link] +=== `++ERC20++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/presets/erc20.cairo[{github-icon},role=heading-link] ```javascript use openzeppelin::presets::ERC20; diff --git a/docs/modules/ROOT/pages/api/erc721.adoc b/docs/modules/ROOT/pages/api/erc721.adoc index e7c154f83..b85597ee2 100644 --- a/docs/modules/ROOT/pages/api/erc721.adoc +++ b/docs/modules/ROOT/pages/api/erc721.adoc @@ -602,7 +602,7 @@ Whenever an IERC721 `token_id` token is transferred to this non-account contract [.contract] [[ERC721]] -=== `++ERC721++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.8.1/src/presets/erc721.cairo[{github-icon},role=heading-link] +=== `++ERC721++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/presets/erc721.cairo[{github-icon},role=heading-link] ```javascript use openzeppelin::presets::ERC721; diff --git a/docs/modules/ROOT/pages/api/introspection.adoc b/docs/modules/ROOT/pages/api/introspection.adoc index 85ae501dc..589630f4a 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.8.1/src/introspection/interface.cairo#L7[{github-icon},role=heading-link] +=== `++ISRC5++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/introspection/interface.cairo#L7[{github-icon},role=heading-link] ```javascript 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.8.1/src/introspection/src5.cairo[{github-icon},role=heading-link] +=== `++SRC5Component++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/introspection/src5.cairo[{github-icon},role=heading-link] ```javascript use openzeppelin::introspection::src5::SRC5Component; diff --git a/docs/modules/ROOT/pages/api/security.adoc b/docs/modules/ROOT/pages/api/security.adoc index a3bcce36c..44a26cec0 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.8.1/src/security/initializable.cairo[{github-icon},role=heading-link] +=== `++InitializableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/security/initializable.cairo[{github-icon},role=heading-link] ```javascript use openzeppelin::security::InitializableComponent; @@ -58,7 +58,7 @@ Requirements: [.contract] [[PausableComponent]] -=== `++PausableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.8.1/src/security/pausable.cairo[{github-icon},role=heading-link] +=== `++PausableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.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.8.1/src/security/reentrancyguard.cairo[{github-icon},role=heading-link] +=== `++ReentrancyGuardComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/security/reentrancyguard.cairo[{github-icon},role=heading-link] ```javascript use openzeppelin::security::ReentrancyGuardComponent; diff --git a/docs/modules/ROOT/pages/api/upgrades.adoc b/docs/modules/ROOT/pages/api/upgrades.adoc index fba6b85ae..11b707248 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.8.1/src/upgrades/interface.cairo#L3[{github-icon},role=heading-link] +=== `++IUpgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.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.8.1/src/upgrades/upgradeable.cairo[{github-icon},role=heading-link] +=== `++UpgradeableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0/src/upgrades/upgradeable.cairo[{github-icon},role=heading-link] ```javascript use openzeppelin::upgrades::upgradeable::UpgradeableComponent; diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index c9fcfc649..568edc5c4 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.8.1" } +openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.9.0" } ---- WARNING: Make sure the tag matches the target release. diff --git a/docs/modules/ROOT/pages/upgrades.adoc b/docs/modules/ROOT/pages/upgrades.adoc index adfef7ccb..34c9ee4fa 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.8.1/src/upgrades/upgradeable.cairo[Upgradeable] +:upgradeable: https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.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/utilities.adoc b/docs/modules/ROOT/pages/utilities.adoc index a962ae92c..5ece94326 100644 --- a/docs/modules/ROOT/pages/utilities.adoc +++ b/docs/modules/ROOT/pages/utilities.adoc @@ -113,7 +113,7 @@ See xref:#serde[`openzeppelin::utils::serde`]. use openzeppelin::utils::selectors; ``` -:selectors: https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.8.1-beta.0/src/utils/selectors.cairo[selectors.cairo] +:selectors: https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0-beta.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}. @@ -284,7 +284,7 @@ See xref:#constants[`openzeppelin::tests::utils::constants`]. use openzeppelin::tests::utils::constants; ``` -:constants: https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.8.1-beta.0/src/tests/utils/constants.cairo[constants.cairo] +:constants: https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.9.0-beta.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/utils/_class_hashes.adoc b/docs/modules/ROOT/pages/utils/_class_hashes.adoc index c254746f4..76fb37a81 100644 --- a/docs/modules/ROOT/pages/utils/_class_hashes.adoc +++ b/docs/modules/ROOT/pages/utils/_class_hashes.adoc @@ -4,7 +4,7 @@ // Class Hashes :account-class-hash: 0x01148c31dfa5c4708a4e9cf1eb0fd3d4d8ad9ccf09d0232cd6b56bee64a7de9d :eth-account-upgradeable-class-hash: 0x023e416842ca96b1f7067693892ed00881d97a4b0d9a4c793b75cb887944d98d -:erc20-class-hash: 0x07c9b5a246fe83b0cd81de65daddb94b3803f94950db99bf2431bbfecf284642 +:erc20-class-hash: 0x7d94f28156c0dc3bfd9a07ca79b15b8da2b5b32093db79000fcd0f6f625d213 :erc721-class-hash: 0x06b7c9efc5467c621f58d87995302d940a39b7217b5c5a7a55555c97cabf5cd8 // Presets page diff --git a/src/access/accesscontrol/accesscontrol.cairo b/src/access/accesscontrol/accesscontrol.cairo index 758b38ecb..44b61ba92 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.8.1 (access/accesscontrol/accesscontrol.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (access/accesscontrol/accesscontrol.cairo) /// # AccessControl Component /// diff --git a/src/access/accesscontrol/dual_accesscontrol.cairo b/src/access/accesscontrol/dual_accesscontrol.cairo index fc445c30c..97c013cd7 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.8.1 (access/accesscontrol/dual_accesscontrol.cairo) +// OpenZeppelin Contracts for Cairo v0.9.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 9a9891029..fdf093c9e 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.8.1 (access/accesscontrol/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.9.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 e6241e3c3..778bb4ab5 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.8.1 (access/ownable/dual_ownable.cairo) +// OpenZeppelin Contracts for Cairo v0.9.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 11a9e7220..d4299d336 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.8.1 (access/ownable/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (access/ownable/interface.cairo) use starknet::ContractAddress; diff --git a/src/access/ownable/ownable.cairo b/src/access/ownable/ownable.cairo index d797af905..851cf5505 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.8.1 (access/ownable/ownable.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (access/ownable/ownable.cairo) /// # Ownable Component /// diff --git a/src/account/account.cairo b/src/account/account.cairo index d043988b8..2f720b8a4 100644 --- a/src/account/account.cairo +++ b/src/account/account.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (account/account.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (account/account.cairo) /// # Account Component /// diff --git a/src/account/dual_account.cairo b/src/account/dual_account.cairo index eee4738d3..e018ec757 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.8.1 (account/dual_account.cairo) +// OpenZeppelin Contracts for Cairo v0.9.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 0cd4d2810..579ebff71 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.8.1 (account/dual_eth_account.cairo) +// OpenZeppelin Contracts for Cairo v0.9.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 4e551f2d3..c0faace72 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.8.1 (account/eth_account.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (account/eth_account.cairo) /// # EthAccount Component /// diff --git a/src/account/interface.cairo b/src/account/interface.cairo index a04af7b40..7ba173a8d 100644 --- a/src/account/interface.cairo +++ b/src/account/interface.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (account/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.9.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 3f9e32bb9..814631f4d 100644 --- a/src/account/utils.cairo +++ b/src/account/utils.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (account/utils.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (account/utils.cairo) mod secp256k1; mod signature; diff --git a/src/account/utils/secp256k1.cairo b/src/account/utils/secp256k1.cairo index dc7ea4805..efaad80b9 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.8.1 (account/utils/secp256k1.cairo) +// OpenZeppelin Contracts for Cairo v0.9.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 c3177ca27..e6cbb23b2 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.8.1 (account/utils/signature.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (account/utils/signature.cairo) use ecdsa::check_ecdsa_signature; use openzeppelin::account::interface::EthPublicKey; diff --git a/src/introspection/dual_src5.cairo b/src/introspection/dual_src5.cairo index 311d558cd..1cb3a0b9d 100644 --- a/src/introspection/dual_src5.cairo +++ b/src/introspection/dual_src5.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (introspection/dual_src5.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (introspection/dual_src5.cairo) use openzeppelin::utils::UnwrapAndCast; use openzeppelin::utils::selectors; diff --git a/src/introspection/interface.cairo b/src/introspection/interface.cairo index 87247de3d..fcfddf71a 100644 --- a/src/introspection/interface.cairo +++ b/src/introspection/interface.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (introspection/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (introspection/interface.cairo) const ISRC5_ID: felt252 = 0x3f918d17e5ee77373b56385708f855659a07f75997f365cf87748628532a055; diff --git a/src/introspection/src5.cairo b/src/introspection/src5.cairo index ef4c3a91d..ea5aa2dca 100644 --- a/src/introspection/src5.cairo +++ b/src/introspection/src5.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (introspection/src5.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (introspection/src5.cairo) /// # SRC5 Component /// diff --git a/src/presets/account.cairo b/src/presets/account.cairo index 0dbd5d487..5c78e5f34 100644 --- a/src/presets/account.cairo +++ b/src/presets/account.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (presets/account.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (presets/account.cairo) /// # Account Preset /// diff --git a/src/presets/erc20.cairo b/src/presets/erc20.cairo index 96e7dd4d5..725959165 100644 --- a/src/presets/erc20.cairo +++ b/src/presets/erc20.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (presets/erc20.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (presets/erc20.cairo) /// # ERC20 Preset /// diff --git a/src/presets/erc721.cairo b/src/presets/erc721.cairo index 74e816605..1ac53d6e3 100644 --- a/src/presets/erc721.cairo +++ b/src/presets/erc721.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (presets/erc721.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (presets/erc721.cairo) /// # ERC721 Preset /// diff --git a/src/presets/eth_account.cairo b/src/presets/eth_account.cairo index ababd8b34..345ace630 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.8.1 (presets/eth_account.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (presets/eth_account.cairo) /// # EthAccount Preset /// diff --git a/src/security/initializable.cairo b/src/security/initializable.cairo index 7529c53c1..b49252080 100644 --- a/src/security/initializable.cairo +++ b/src/security/initializable.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (security/initializable.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (security/initializable.cairo) /// # Initializable Component /// diff --git a/src/security/pausable.cairo b/src/security/pausable.cairo index 63d053b76..74ae9b2a2 100644 --- a/src/security/pausable.cairo +++ b/src/security/pausable.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (security/pausable.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (security/pausable.cairo) /// # Pausable Component /// diff --git a/src/security/reentrancyguard.cairo b/src/security/reentrancyguard.cairo index 10407b13a..5960245a9 100644 --- a/src/security/reentrancyguard.cairo +++ b/src/security/reentrancyguard.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (security/reentrancyguard.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (security/reentrancyguard.cairo) /// # ReentrancyGuard Component /// diff --git a/src/token/erc20/dual20.cairo b/src/token/erc20/dual20.cairo index 7cb5a2e1b..e0fe9dd0b 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.8.1 (token/erc20/dual20.cairo) +// OpenZeppelin Contracts for Cairo v0.9.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 4b3279b43..105f11c32 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.8.1 (token/erc20/erc20.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (token/erc20/erc20.cairo) /// # ERC20 Component /// @@ -7,7 +7,7 @@ /// 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.8.1/guides/erc20-supply) +/// See [the documentation](https://docs.openzeppelin.com/contracts-cairo/0.9.0/guides/erc20-supply) /// for examples. #[starknet::component] mod ERC20Component { diff --git a/src/token/erc20/interface.cairo b/src/token/erc20/interface.cairo index 867b3032e..829ebd40e 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.8.1 (token/erc20/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (token/erc20/interface.cairo) use starknet::ContractAddress; diff --git a/src/token/erc721/dual721.cairo b/src/token/erc721/dual721.cairo index 6064962d0..0feb9e879 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.8.1 (token/erc721/dual721.cairo) +// OpenZeppelin Contracts for Cairo v0.9.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 699619249..f7fe90e06 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.8.1 (token/erc721/dual721_receiver.cairo) +// OpenZeppelin Contracts for Cairo v0.9.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 a04a6b8dd..9a9a3e44b 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.8.1 (token/erc721/erc721.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (token/erc721/erc721.cairo) /// # ERC721 Component /// diff --git a/src/token/erc721/erc721_receiver.cairo b/src/token/erc721/erc721_receiver.cairo index 9f628b4c1..6435c3da5 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.8.1 (token/erc721/erc721_receiver.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (token/erc721/erc721_receiver.cairo) /// # ERC721Receiver Component /// diff --git a/src/token/erc721/interface.cairo b/src/token/erc721/interface.cairo index e9ab356be..b2aa22ec4 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.8.1 (token/erc721/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (token/erc721/interface.cairo) use starknet::ContractAddress; diff --git a/src/upgrades/interface.cairo b/src/upgrades/interface.cairo index a22583bd8..b00a9e77c 100644 --- a/src/upgrades/interface.cairo +++ b/src/upgrades/interface.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (upgrades/interface.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (upgrades/interface.cairo) use starknet::ClassHash; diff --git a/src/upgrades/upgradeable.cairo b/src/upgrades/upgradeable.cairo index 0cf923a1d..47711169c 100644 --- a/src/upgrades/upgradeable.cairo +++ b/src/upgrades/upgradeable.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (upgrades/upgradeable.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (upgrades/upgradeable.cairo) /// # Upgradeable Component /// diff --git a/src/utils.cairo b/src/utils.cairo index 6d558f18a..26e82e26c 100644 --- a/src/utils.cairo +++ b/src/utils.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (utils.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (utils.cairo) mod selectors; mod serde; diff --git a/src/utils/selectors.cairo b/src/utils/selectors.cairo index 2fdba894e..3ec5e25a8 100644 --- a/src/utils/selectors.cairo +++ b/src/utils/selectors.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (utils/selectors.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (utils/selectors.cairo) // // AccessControl diff --git a/src/utils/serde.cairo b/src/utils/serde.cairo index b1f3ca538..1d98f2f85 100644 --- a/src/utils/serde.cairo +++ b/src/utils/serde.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts for Cairo v0.8.1 (utils/serde.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (utils/serde.cairo) trait SerializedAppend { fn append_serde(ref self: Array, value: T); diff --git a/src/utils/unwrap_and_cast.cairo b/src/utils/unwrap_and_cast.cairo index 12d52638e..45870e30b 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.8.1 (utils/unwrap_and_cast.cairo) +// OpenZeppelin Contracts for Cairo v0.9.0 (utils/unwrap_and_cast.cairo) use starknet::SyscallResult; use starknet::SyscallResultTrait;