diff --git a/Scarb.lock b/Scarb.lock index a67000d04..1bbd9d00f 100644 --- a/Scarb.lock +++ b/Scarb.lock @@ -61,6 +61,7 @@ dependencies = [ "openzeppelin_access", "openzeppelin_introspection", "openzeppelin_testing", + "openzeppelin_utils", "snforge_std", ] diff --git a/packages/account/src/extensions/src9/src9.cairo b/packages/account/src/extensions/src9/src9.cairo index e9b7b3afc..460726871 100644 --- a/packages/account/src/extensions/src9/src9.cairo +++ b/packages/account/src/extensions/src9/src9.cairo @@ -10,11 +10,11 @@ /// interface. #[starknet::component] pub mod SRC9Component { + use crate::dual_account::{DualCaseAccount, DualCaseAccountTrait}; use crate::extensions::src9::OutsideExecution; use crate::extensions::src9::interface; use crate::extensions::src9::snip12_utils::OutsideExecutionStructHash; use crate::utils::execute_calls; - use openzeppelin_account::dual_account::{DualCaseAccount, DualCaseAccountTrait}; use openzeppelin_introspection::src5::SRC5Component::InternalTrait as SRC5InternalTrait; use openzeppelin_introspection::src5::SRC5Component; use openzeppelin_utils::cryptography::snip12::{OffchainMessageHash, SNIP12Metadata}; diff --git a/packages/finance/src/tests/mocks/vesting_mocks.cairo b/packages/finance/src/tests/mocks/vesting_mocks.cairo index 9fb938459..0674035d4 100644 --- a/packages/finance/src/tests/mocks/vesting_mocks.cairo +++ b/packages/finance/src/tests/mocks/vesting_mocks.cairo @@ -1,7 +1,7 @@ #[starknet::contract] pub(crate) mod LinearVestingMock { + use crate::vesting::{VestingComponent, LinearVestingSchedule}; use openzeppelin_access::ownable::OwnableComponent; - use openzeppelin_finance::vesting::{VestingComponent, LinearVestingSchedule}; use starknet::ContractAddress; component!(path: OwnableComponent, storage: ownable, event: OwnableEvent); @@ -49,9 +49,9 @@ pub(crate) mod LinearVestingMock { #[starknet::contract] pub(crate) mod StepsVestingMock { + use crate::vesting::VestingComponent::VestingScheduleTrait; + use crate::vesting::VestingComponent; use openzeppelin_access::ownable::OwnableComponent; - use openzeppelin_finance::vesting::VestingComponent::VestingScheduleTrait; - use openzeppelin_finance::vesting::VestingComponent; use starknet::ContractAddress; use starknet::storage::{StoragePointerReadAccess, StoragePointerWriteAccess}; diff --git a/packages/finance/src/tests/test_vesting_linear.cairo b/packages/finance/src/tests/test_vesting_linear.cairo index f7e6251f8..8ed5ecf4b 100644 --- a/packages/finance/src/tests/test_vesting_linear.cairo +++ b/packages/finance/src/tests/test_vesting_linear.cairo @@ -1,9 +1,9 @@ +use crate::tests::common::{VestingStrategy, TestData, setup, set_transfer_to_fail}; +use crate::tests::mocks::vesting_mocks::LinearVestingMock; +use crate::vesting::VestingComponent::InternalImpl; +use crate::vesting::VestingComponent; +use crate::vesting::interface::IVestingDispatcherTrait; use openzeppelin_access::ownable::interface::{IOwnableDispatcher, IOwnableDispatcherTrait}; -use openzeppelin_finance::tests::common::{VestingStrategy, TestData, setup, set_transfer_to_fail}; -use openzeppelin_finance::tests::mocks::vesting_mocks::LinearVestingMock; -use openzeppelin_finance::vesting::VestingComponent::InternalImpl; -use openzeppelin_finance::vesting::VestingComponent; -use openzeppelin_finance::vesting::interface::IVestingDispatcherTrait; use openzeppelin_test_common::vesting::VestingSpyHelpers; use openzeppelin_testing::constants::{OWNER, OTHER}; use openzeppelin_token::erc20::interface::{IERC20Dispatcher, IERC20DispatcherTrait}; diff --git a/packages/finance/src/tests/test_vesting_steps.cairo b/packages/finance/src/tests/test_vesting_steps.cairo index f08192b7d..9c71eb043 100644 --- a/packages/finance/src/tests/test_vesting_steps.cairo +++ b/packages/finance/src/tests/test_vesting_steps.cairo @@ -1,9 +1,9 @@ +use crate::tests::common::{VestingStrategy, TestData, setup, set_transfer_to_fail}; +use crate::tests::mocks::vesting_mocks::StepsVestingMock; +use crate::vesting::VestingComponent::InternalImpl; +use crate::vesting::VestingComponent; +use crate::vesting::interface::IVestingDispatcherTrait; use openzeppelin_access::ownable::interface::{IOwnableDispatcher, IOwnableDispatcherTrait}; -use openzeppelin_finance::tests::common::{VestingStrategy, TestData, setup, set_transfer_to_fail}; -use openzeppelin_finance::tests::mocks::vesting_mocks::StepsVestingMock; -use openzeppelin_finance::vesting::VestingComponent::InternalImpl; -use openzeppelin_finance::vesting::VestingComponent; -use openzeppelin_finance::vesting::interface::IVestingDispatcherTrait; use openzeppelin_test_common::vesting::VestingSpyHelpers; use openzeppelin_testing::constants::{OWNER, OTHER}; use openzeppelin_token::erc20::interface::{IERC20Dispatcher, IERC20DispatcherTrait}; diff --git a/packages/finance/src/vesting/vesting.cairo b/packages/finance/src/vesting/vesting.cairo index 131b6b98f..6b57891f4 100644 --- a/packages/finance/src/vesting/vesting.cairo +++ b/packages/finance/src/vesting/vesting.cairo @@ -29,9 +29,9 @@ use starknet::ContractAddress; /// vesting schedule to ensure the vested amount is as intended. #[starknet::component] pub mod VestingComponent { + use crate::vesting::interface; use openzeppelin_access::ownable::OwnableComponent::OwnableImpl; use openzeppelin_access::ownable::OwnableComponent; - use openzeppelin_finance::vesting::interface; use openzeppelin_token::erc20::interface::{IERC20Dispatcher, IERC20DispatcherTrait}; use starknet::ContractAddress; use starknet::storage::{Map, StorageMapReadAccess, StorageMapWriteAccess}; diff --git a/packages/governance/Scarb.toml b/packages/governance/Scarb.toml index d54c38b0a..dfc2f80b5 100644 --- a/packages/governance/Scarb.toml +++ b/packages/governance/Scarb.toml @@ -30,6 +30,7 @@ openzeppelin_introspection = { path = "../introspection" } assert_macros.workspace = true snforge_std.workspace = true openzeppelin_testing = { path = "../testing" } +openzeppelin_utils = { path = "../utils" } [lib] diff --git a/packages/security/src/interface.cairo b/packages/security/src/interface.cairo index 709b8026c..746fe4ce2 100644 --- a/packages/security/src/interface.cairo +++ b/packages/security/src/interface.cairo @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts for Cairo v0.17.0 (security/interface.cairo) + #[starknet::interface] pub trait IInitializable { fn is_initialized(self: @TState) -> bool;