Repository: OpenZeppelin/cairo-contracts (language: python)

Issue:
Fix transient dependencies
**🧐 Motivation**
In Scarb 2.9.x transient deps no longer work. For example, this used to work when depending on openzeppelin:

```
#[starknet::contract]
mod HelloStarknet {
    use openzeppelin_utils::cryptography::snip12;
    #[storage]
    struct Storage {
        balance: felt252, 
    }
}
```

but does not build with 2.9.1 as `openzeppelin_utils` is not an explicit dependency.

In a few places like [here](https://github.com/OpenZeppelin/cairo-contracts/blob/3fdef278da4560c017bd09a241abb468161a94ce/packages/governance/src/votes/delegation.cairo#L6), we use dev dependencies in non-testing code.

This messes up creating a package with 2.9.1. Unfortunately, it still builds with 2.9.1.

Transient dependencies should be then removed/fixed.




Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 69dfaa2fb..2364460aa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -39,6 +39,13 @@ use crate::votes::VotesComponent::VotingUnitsTrait;
 - VestingComponent `release` function won't emit an event or attempt to transfer when the amount is zero (#1209)
 - Bump snforge_std to v0.33.0 (#1203)
 
+### Fixed
+
+- Scarb manifest dependencies (#1249):
+  - Move `openzeppelin_utils` from dev dep to dep in governance manifest
+  - Remove `openzeppelin_utils` as dep in access package
+  - Change `openzeppelin_account` to `crate` in `src9.cairo`
+
 ## 0.19.0 (2024-11-08)
 
 ### Added
diff --git a/Scarb.lock b/Scarb.lock
index afe1436bd..4438304d8 100644
--- a/Scarb.lock
+++ b/Scarb.lock
@@ -28,7 +28,6 @@ dependencies = [
  "openzeppelin_introspection",
  "openzeppelin_test_common",
  "openzeppelin_testing",
- "openzeppelin_utils",
  "snforge_std",
 ]
 
diff --git a/packages/access/Scarb.toml b/packages/access/Scarb.toml
index 0f29ee37b..1aaeefa87 100644
--- a/packages/access/Scarb.toml
+++ b/packages/access/Scarb.toml
@@ -24,7 +24,6 @@ fmt.workspace = true
 [dependencies]
 starknet.workspace = true
 openzeppelin_introspection = { path = "../introspection" }
-openzeppelin_utils = { path = "../utils" }
 
 [dev-dependencies]
 assert_macros.workspace = true
diff --git a/packages/account/src/extensions/src9/src9.cairo b/packages/account/src/extensions/src9/src9.cairo
index 711d87a5f..fc94e7b11 100644
--- a/packages/account/src/extensions/src9/src9.cairo
+++ b/packages/account/src/extensions/src9/src9.cairo
@@ -13,8 +13,8 @@ pub mod SRC9Component {
     use crate::extensions::src9::OutsideExecution;
     use crate::extensions::src9::interface;
     use crate::extensions::src9::snip12_utils::OutsideExecutionStructHash;
+    use crate::interface::{ISRC6Dispatcher, ISRC6DispatcherTrait};
     use crate::utils::execute_calls;
-    use openzeppelin_account::interface::{ISRC6Dispatcher, ISRC6DispatcherTrait};
     use openzeppelin_introspection::src5::SRC5Component;
     use openzeppelin_introspection::src5::SRC5Component::InternalTrait as SRC5InternalTrait;
     use openzeppelin_utils::cryptography::snip12::{OffchainMessageHash, SNIP12Metadata};
diff --git a/packages/governance/Scarb.toml b/packages/governance/Scarb.toml
index d9afb52cf..96ef5961a 100644
--- a/packages/governance/Scarb.toml
+++ b/packages/governance/Scarb.toml
@@ -27,11 +27,11 @@ openzeppelin_access = { path = "../access" }
 openzeppelin_introspection = { path = "../introspection" }
 openzeppelin_account = { path = "../account" }
 openzeppelin_token = { path= "../token" }
+openzeppelin_utils = { path = "../utils" }
 
 [dev-dependencies]
 assert_macros.workspace = true
 snforge_std.workspace = true
-openzeppelin_utils = { path = "../utils" }
 openzeppelin_testing = { path = "../testing" }
 openzeppelin_test_common = { path = "../test_common" }
 


Test patch:
diff --git a/packages/account/src/tests/test_signature.cairo b/packages/account/src/tests/test_signature.cairo
index a9ac26b5a..8405a1882 100644
--- a/packages/account/src/tests/test_signature.cairo
+++ b/packages/account/src/tests/test_signature.cairo
@@ -1,8 +1,8 @@
 use crate::interface::P256PublicKey;
+use crate::utils::signature::Secp256Signature;
 use crate::utils::signature::{
     is_valid_eth_signature, is_valid_p256_signature, is_valid_stark_signature,
 };
-use openzeppelin_account::utils::signature::Secp256Signature;
 use openzeppelin_test_common::account::SIGNED_TX_DATA as stark_signature_data;
 use openzeppelin_test_common::eth_account::SIGNED_TX_DATA as eth_signature_data;
 use openzeppelin_testing::constants::{TRANSACTION_HASH, secp256k1, secp256r1, stark};
diff --git a/packages/finance/src/tests/common.cairo b/packages/finance/src/tests/common.cairo
index e6e93524f..ba3ecda82 100644
--- a/packages/finance/src/tests/common.cairo
+++ b/packages/finance/src/tests/common.cairo
@@ -1,4 +1,4 @@
-use openzeppelin_finance::vesting::interface::IVestingDispatcher;
+use crate::vesting::interface::IVestingDispatcher;
 use openzeppelin_testing as utils;
 use openzeppelin_testing::constants;
 use openzeppelin_token::erc20::interface::IERC20Dispatcher;