Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use crate for local imports #1176

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ dependencies = [
"openzeppelin_access",
"openzeppelin_introspection",
"openzeppelin_testing",
"openzeppelin_utils",
"snforge_std",
]

Expand Down
2 changes: 1 addition & 1 deletion packages/account/src/extensions/src9/src9.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
6 changes: 3 additions & 3 deletions packages/finance/src/tests/mocks/vesting_mocks.cairo
Original file line number Diff line number Diff line change
@@ -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);
Expand Down Expand Up @@ -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};

Expand Down
10 changes: 5 additions & 5 deletions packages/finance/src/tests/test_vesting_linear.cairo
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
10 changes: 5 additions & 5 deletions packages/finance/src/tests/test_vesting_steps.cairo
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
2 changes: 1 addition & 1 deletion packages/finance/src/vesting/vesting.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 1 addition & 0 deletions packages/governance/Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
3 changes: 3 additions & 0 deletions packages/security/src/interface.cairo
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts for Cairo v0.17.0 (security/interface.cairo)

#[starknet::interface]
pub trait IInitializable<TState> {
fn is_initialized(self: @TState) -> bool;
Expand Down