Skip to content

Commit

Permalink
refactor: move erc2981 into the common module
Browse files Browse the repository at this point in the history
  • Loading branch information
ericnordelo committed Aug 9, 2024
1 parent b9d7259 commit cdf5f9d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 229 deletions.
5 changes: 0 additions & 5 deletions packages/token/src/erc2981.cairo

This file was deleted.

208 changes: 0 additions & 208 deletions packages/token/src/erc2981/erc2981.cairo

This file was deleted.

11 changes: 0 additions & 11 deletions packages/token/src/erc2981/interface.cairo

This file was deleted.

2 changes: 1 addition & 1 deletion packages/token/src/lib.cairo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pub mod erc1155;
pub mod erc20;
pub mod erc2981;
pub mod common;
pub mod erc721;

pub mod tests;
6 changes: 3 additions & 3 deletions packages/token/src/tests/erc2981/test_erc2981.cairo
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use openzeppelin_introspection::interface::{ISRC5Dispatcher, ISRC5DispatcherTrait};
use openzeppelin_introspection::src5::SRC5Component::SRC5Impl;
use openzeppelin_testing::constants::{OTHER, ZERO, RECIPIENT};
use openzeppelin_token::erc2981::ERC2981Component::{ERC2981Impl, InternalImpl};
use openzeppelin_token::erc2981::interface::IERC2981_ID;
use openzeppelin_token::erc2981::{ERC2981Component, ERC2981ImmutableDefault};
use openzeppelin_token::common::erc2981::ERC2981Component::{ERC2981Impl, InternalImpl};
use openzeppelin_token::common::erc2981::interface::IERC2981_ID;
use openzeppelin_token::common::erc2981::{ERC2981Component, ERC2981ImmutableDefault};
use openzeppelin_token::tests::mocks::erc2981_mocks::ERC2981Mock;
use starknet::{ContractAddress, contract_address_const};

Expand Down
2 changes: 1 addition & 1 deletion packages/token/src/tests/mocks/erc2981_mocks.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[starknet::contract]
pub(crate) mod ERC2981Mock {
use openzeppelin_introspection::src5::SRC5Component;
use openzeppelin_token::erc2981::{ERC2981Component, ERC2981ImmutableDefault};
use openzeppelin_token::common::erc2981::{ERC2981Component, ERC2981ImmutableDefault};
use starknet::ContractAddress;

component!(path: ERC2981Component, storage: erc2981, event: ERC2981Event);
Expand Down

0 comments on commit cdf5f9d

Please sign in to comment.