Skip to content

Commit c73ef18

Browse files
authored
Decouple utils and fix versioning (#1531)
* feat: decouple utils and fix versioning * feat: update CHANGELOG * feat: move execution utils * feat: update CHANGELOGs * feat: bump scarb version
1 parent 34d08e3 commit c73ef18

File tree

26 files changed

+130
-66
lines changed

26 files changed

+130
-66
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## Unreleased
1111

12+
### Changed
13+
14+
- Decoupled openzeppelin_utils version from the umbrella package (#1531)
15+
- Removed openzeppelin_governance dependency on openzeppelin_account (#1531)
16+
- Removed openzeppelin_token dependency on openzeppelin_account (#1531)
17+
18+
### Changed (Breaking)
19+
20+
- Removed `execute_single_call`, `execute_calls` and `assert_valid_signature` from openzeppelin_account::utils (#1531)
21+
1222
## 3.0.0-alpha.2 (2025-09-10)
1323

1424
### Added

Scarb.lock

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ name = "openzeppelin_governance"
6464
version = "3.0.0-alpha.2"
6565
dependencies = [
6666
"openzeppelin_access",
67-
"openzeppelin_account",
6867
"openzeppelin_interfaces",
6968
"openzeppelin_introspection",
7069
"openzeppelin_test_common",
@@ -76,7 +75,7 @@ dependencies = [
7675

7776
[[package]]
7877
name = "openzeppelin_interfaces"
79-
version = "2.1.0"
78+
version = "2.1.0-alpha.0"
8079
dependencies = [
8180
"snforge_std",
8281
]
@@ -161,7 +160,6 @@ name = "openzeppelin_token"
161160
version = "3.0.0-alpha.2"
162161
dependencies = [
163162
"openzeppelin_access",
164-
"openzeppelin_account",
165163
"openzeppelin_interfaces",
166164
"openzeppelin_introspection",
167165
"openzeppelin_test_common",
@@ -181,7 +179,7 @@ dependencies = [
181179

182180
[[package]]
183181
name = "openzeppelin_utils"
184-
version = "3.0.0-alpha.2"
182+
version = "3.1.0-alpha.0"
185183
dependencies = [
186184
"openzeppelin_interfaces",
187185
"openzeppelin_test_common",

Scarb.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ keywords = [
4343
]
4444

4545
[workspace.dependencies]
46-
assert_macros = "2.12.0"
47-
starknet = "2.12.0"
46+
assert_macros = "2.12.2"
47+
starknet = "2.12.2"
4848
snforge_std = "0.50.0"
4949

5050
[dependencies]

docs/modules/ROOT/pages/api/utilities.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
= Utilities
22

3+
include::../utils/_common.adoc[]
4+
35
:deploy_syscall: link:https://docs.starknet.io/architecture-and-concepts/smart-contracts/system-calls-cairo1/#deploy[deploy_syscall]
46
:eip6372: link:https://eips.ethereum.org/EIPS/eip-6372[EIP-6372]
57

68
This crate provides miscellaneous components and libraries containing utility functions to handle common tasks.
79

10+
[IMPORTANT]
11+
====
12+
This API reference is for the `openzeppelin_utils` package version `v{current_openzeppelin_utils_version}`.
13+
14+
The `openzeppelin` package is an umbrella (meta) package that aggregates all library subpackages. Prior to v3.x, the umbrella and its subpackages were
15+
versioned in lockstep—their versions always matched. Starting with v3.x, following the introduction of `openzeppelin_interfaces`, the umbrella is
16+
versioned independently from some of the subpackages.
17+
18+
See the xref:../index.adoc#versioning_of_the_sub_packages[Versioning of the sub-packages] section for more information.
19+
====
20+
821
== Core
922

1023
[.contract]

docs/modules/ROOT/pages/index.adoc

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ before proceeding, and run the following command to check that the installation
2323
----
2424
$ scarb --version
2525
26-
scarb 2.12.0 (639d0a65e 2025-08-04)
27-
cairo: 2.12.0 (https://crates.io/crates/cairo-lang-compiler/2.12.0)
26+
scarb 2.12.2 (dc0dbfd50 2025-09-15)
27+
cairo: 2.12.2 (https://crates.io/crates/cairo-lang-compiler/2.12.2)
2828
sierra: 1.7.0
2929
----
3030

@@ -59,13 +59,9 @@ Scarb.toml src
5959

6060
[IMPORTANT]
6161
====
62-
The `openzeppelin` package is an umbrella package that includes all the packages in the library.
63-
Before version `3.x.x`, the `openzeppelin` and its sub-packages
64-
were versioned together meaning that the version of the `openzeppelin`
65-
package was the same as the version of the sub-packages.
66-
67-
Starting from version `3.x.x`, with the introduction of the `openzeppelin_interfaces` package,
68-
the `openzeppelin` package is versioned independently from the sub-packages.
62+
The `openzeppelin` package is an umbrella (meta) package that aggregates all library subpackages. Prior to v3.x, the umbrella and its subpackages were
63+
versioned in lockstep—their versions always matched. Starting with v3.x, following the introduction of `openzeppelin_interfaces`, the umbrella is
64+
versioned independently from some of the subpackages.
6965
7066
See the {versioning} section for more information.
7167
====
@@ -109,7 +105,9 @@ openzeppelin_presets = "3.0.0-alpha.2"
109105
openzeppelin_security = "3.0.0-alpha.2"
110106
openzeppelin_token = "3.0.0-alpha.2"
111107
openzeppelin_upgrades = "3.0.0-alpha.2"
112-
openzeppelin_utils = "3.0.0-alpha.2"
108+
109+
openzeppelin_interfaces = "{current_openzeppelin_interfaces_version}"
110+
openzeppelin_utils = "{current_openzeppelin_utils_version}"
113111
----
114112

115113
== Basic usage

docs/modules/ROOT/pages/utils/_common.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
:immutable-config: xref:components.adoc#immutable_config[Immutable Component Config]
77

88
// Variables
9-
:current_openzeppelin_interfaces_version: 2.1.0
9+
:current_openzeppelin_interfaces_version: 2.1.0-alpha.0
10+
:current_openzeppelin_utils_version: 3.1.0-alpha.0

packages/account/src/account.cairo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ pub mod AccountComponent {
1414
use openzeppelin_introspection::src5::SRC5Component::{
1515
InternalTrait as SRC5InternalTrait, SRC5Impl,
1616
};
17+
use openzeppelin_utils::execution::execute_single_call;
1718
use starknet::account::Call;
1819
use starknet::storage::{StoragePointerReadAccess, StoragePointerWriteAccess};
19-
use crate::utils::{execute_single_call, is_tx_version_valid, is_valid_stark_signature};
20+
use crate::utils::{is_tx_version_valid, is_valid_stark_signature};
2021

2122
#[storage]
2223
pub struct Storage {

packages/account/src/eth_account.cairo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ pub mod EthAccountComponent {
1515
use openzeppelin_introspection::src5::SRC5Component::{
1616
InternalTrait as SRC5InternalTrait, SRC5Impl,
1717
};
18+
use openzeppelin_utils::execution::execute_single_call;
1819
use starknet::SyscallResultTrait;
1920
use starknet::account::Call;
2021
use starknet::secp256_trait::Secp256PointTrait;
2122
use starknet::storage::{StoragePointerReadAccess, StoragePointerWriteAccess};
2223
use crate::utils::secp256_point::Secp256PointStorePacking;
23-
use crate::utils::{execute_single_call, is_tx_version_valid, is_valid_eth_signature};
24+
use crate::utils::{is_tx_version_valid, is_valid_eth_signature};
2425

2526
#[storage]
2627
pub struct Storage {

packages/account/src/extensions/src9/src9.cairo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ pub mod SRC9Component {
1515
use openzeppelin_introspection::src5::SRC5Component;
1616
use openzeppelin_introspection::src5::SRC5Component::InternalTrait as SRC5InternalTrait;
1717
use openzeppelin_utils::cryptography::snip12::{OffchainMessageHash, SNIP12Metadata};
18+
use openzeppelin_utils::execution::{assert_valid_signature, execute_calls};
1819
use starknet::storage::{Map, StorageMapReadAccess, StorageMapWriteAccess};
1920
use crate::extensions::src9::snip12_utils::OutsideExecutionStructHash;
20-
use crate::utils::{assert_valid_signature, execute_calls};
2121

2222
#[storage]
2323
pub struct Storage {

packages/account/src/tests.cairo

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ mod test_account;
44
mod test_eth_account;
55
mod test_secp256_point;
66
mod test_signature;
7-
mod test_utils;

0 commit comments

Comments
 (0)