Skip to content

Commit

Permalink
Use OZ account preset instead of a local copy
Browse files Browse the repository at this point in the history
  • Loading branch information
kfastov committed Mar 26, 2024
1 parent c7f4f04 commit f6ad3e7
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 262 deletions.
1 change: 0 additions & 1 deletion src/tests.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ mod unit {
}

mod mocks {
mod account;
mod receiver;
mod contracts;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tests/integration/test_base.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ use starknet::testing;
// External deps
use openzeppelin::introspection::interface::{ISRC5Dispatcher, ISRC5DispatcherTrait, ISRC5_ID};
use openzeppelin::token::erc721::interface::{IERC721Dispatcher, IERC721DispatcherTrait, IERC721_ID};
use openzeppelin::presets::Account;

// Local deps
use cairo_erc_3525::interface::{IERC3525Dispatcher, IERC3525DispatcherTrait, IERC3525_ID};
use cairo_erc_3525::presets::erc3525_mintable_burnable::{
ERC3525MintableBurnable, IExternalDispatcher, IExternalDispatcherTrait
};
use cairo_erc_3525::tests::integration::constants;
use cairo_erc_3525::tests::mocks::account::Account;

#[derive(Drop)]
struct Signers {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/integration/test_metadata.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use starknet::testing;
// External deps
use openzeppelin::introspection::interface::{ISRC5Dispatcher, ISRC5DispatcherTrait, ISRC5_ID};
use openzeppelin::token::erc721::interface::{IERC721Dispatcher, IERC721DispatcherTrait, IERC721_ID};
use openzeppelin::presets::Account;

// Local deps
use cairo_erc_3525::interface::{IERC3525Dispatcher, IERC3525DispatcherTrait, IERC3525_ID};
Expand All @@ -21,7 +22,6 @@ use cairo_erc_3525::extensions::metadata::interface::{
IERC3525MetadataDispatcher, IERC3525MetadataDispatcherTrait, IERC3525_METADATA_ID
};
use cairo_erc_3525::tests::integration::constants;
use cairo_erc_3525::tests::mocks::account::Account;

#[derive(Drop)]
struct Signers {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/integration/test_receiver.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use starknet::testing;
// External deps
use openzeppelin::introspection::interface::{ISRC5Dispatcher, ISRC5DispatcherTrait, ISRC5_ID};
use openzeppelin::token::erc721::interface::{IERC721Dispatcher, IERC721DispatcherTrait, IERC721_ID};
use openzeppelin::presets::Account;

// Local deps
use cairo_erc_3525::interface::{IERC3525Dispatcher, IERC3525DispatcherTrait, IERC3525_ID};
Expand All @@ -19,7 +20,6 @@ use cairo_erc_3525::presets::erc3525_mintable_burnable::{
};
use cairo_erc_3525::tests::integration::constants;
use cairo_erc_3525::tests::mocks::receiver::{IReceiverDispatcher, IReceiverDispatcherTrait};
use cairo_erc_3525::tests::mocks::account::Account;
use cairo_erc_3525::tests::mocks::receiver::Receiver;

#[derive(Drop)]
Expand Down
2 changes: 1 addition & 1 deletion src/tests/integration/test_slot_approvable.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use starknet::testing;
// External deps
use openzeppelin::introspection::interface::{ISRC5Dispatcher, ISRC5DispatcherTrait, ISRC5_ID};
use openzeppelin::token::erc721::interface::{IERC721Dispatcher, IERC721DispatcherTrait, IERC721_ID};
use openzeppelin::presets::Account;

// Local deps
use cairo_erc_3525::interface::{IERC3525Dispatcher, IERC3525DispatcherTrait, IERC3525_ID};
Expand All @@ -22,7 +23,6 @@ use cairo_erc_3525::extensions::slotapprovable::interface::{
IERC3525_SLOT_APPROVABLE_ID
};
use cairo_erc_3525::tests::integration::constants;
use cairo_erc_3525::tests::mocks::account::Account;

#[derive(Drop)]
struct Signers {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/integration/test_slot_enumerable.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use starknet::testing;
// External deps
use openzeppelin::introspection::interface::{ISRC5Dispatcher, ISRC5DispatcherTrait, ISRC5_ID};
use openzeppelin::token::erc721::interface::{IERC721Dispatcher, IERC721DispatcherTrait, IERC721_ID};
use openzeppelin::presets::Account;

// Local deps
use cairo_erc_3525::interface::{IERC3525Dispatcher, IERC3525DispatcherTrait, IERC3525_ID};
Expand All @@ -22,7 +23,6 @@ use cairo_erc_3525::extensions::slotenumerable::interface::{
IERC3525_SLOT_ENUMERABLE_ID
};
use cairo_erc_3525::tests::integration::constants;
use cairo_erc_3525::tests::mocks::account::Account;

use debug::PrintTrait;

Expand Down
252 changes: 0 additions & 252 deletions src/tests/mocks/account.cairo

This file was deleted.

2 changes: 1 addition & 1 deletion src/tests/unit/test_metadata.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ use starknet::testing::set_caller_address;
// External imports

use openzeppelin::token::erc721::erc721::ERC721Component;
use openzeppelin::presets::Account;

// Local imports

use cairo_erc_3525::tests::mocks::account::Account;
use cairo_erc_3525::module::ERC3525Component;
use cairo_erc_3525::extensions::metadata::module::ERC3525MetadataComponent::{ ERC3525MetadataImpl, InternalImpl };
use cairo_erc_3525::extensions::metadata::module::ERC3525MetadataComponent;
Expand Down
2 changes: 1 addition & 1 deletion src/tests/unit/test_slot_enumerable.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ use starknet::testing::set_caller_address;

use openzeppelin::token::erc721::erc721::ERC721Component::{ ERC721Impl, InternalImpl as ERC721InternalImpl };
use openzeppelin::token::erc721::erc721::ERC721Component;
use openzeppelin::presets::Account;

// Local imports

use cairo_erc_3525::tests::mocks::account::Account;
use cairo_erc_3525::module::ERC3525Component::{ ERC3525Impl, InternalImpl };
use cairo_erc_3525::module::ERC3525Component;
use cairo_erc_3525::extensions::slotenumerable::module::ERC3525SlotEnumerableComponent::{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/unit/test_transfer_to_address.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ use starknet::testing::set_caller_address;

use openzeppelin::token::erc721::erc721::ERC721Component::{ ERC721Impl, InternalImpl as ERC721InternalImpl };
use openzeppelin::token::erc721::erc721::ERC721Component;
use openzeppelin::presets::Account;

// Local imports

use cairo_erc_3525::tests::mocks::account::Account;
use cairo_erc_3525::module::ERC3525Component::{ ERC3525Impl, InternalImpl };
use cairo_erc_3525::module::ERC3525Component;
use cairo_erc_3525::tests::unit::constants::{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/unit/test_transfer_to_token.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ use starknet::testing::set_caller_address;

use openzeppelin::token::erc721::erc721::ERC721Component::{ ERC721Impl, InternalImpl as ERC721InternalImpl };
use openzeppelin::token::erc721::erc721::ERC721Component;
use openzeppelin::presets::Account;

// Local imports

use cairo_erc_3525::tests::mocks::account::Account;
use cairo_erc_3525::module::ERC3525Component::{ ERC3525Impl, InternalImpl };
use cairo_erc_3525::module::ERC3525Component;
use cairo_erc_3525::tests::unit::constants::{
Expand Down

0 comments on commit f6ad3e7

Please sign in to comment.