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

Issue:
Remove DualDispatchers
**🧐 Motivation**
They are not supported on live networks and make our library more blotted. 

**📝 Details**
We've had `DualDispatchers` for a while now, and since they are not supported on live networks they haven't been adopted. They are an additional liability in our codebase and make the amount of LOC bigger for any security review. 


```[tasklist]
### Tasks
- [x] Remove access dual dispatchers
- [x] Remove account dual dispatchers
- [x] Remove erc20 dual dispatchers
- [x] Remove erc721 dual dispatchers
- [x] Remove erc1155 dual dispatchers
- [ ] docs and CHANGELOG
```



Discussion / hints:

Fix patch:
diff --git a/packages/account/src/dual_account.cairo b/packages/account/src/dual_account.cairo
deleted file mode 100644
index 5872df0ff..000000000
--- a/packages/account/src/dual_account.cairo
+++ /dev/null
@@ -1,67 +0,0 @@
-// SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts for Cairo v0.17.0 (account/dual_account.cairo)
-
-use openzeppelin_utils::UnwrapAndCast;
-use openzeppelin_utils::selectors;
-use openzeppelin_utils::serde::SerializedAppend;
-use openzeppelin_utils::try_selector_with_fallback;
-use starknet::ContractAddress;
-use starknet::SyscallResultTrait;
-use starknet::syscalls::call_contract_syscall;
-
-#[derive(Copy, Drop)]
-pub struct DualCaseAccount {
-    pub contract_address: ContractAddress
-}
-
-pub trait DualCaseAccountTrait {
-    fn set_public_key(self: @DualCaseAccount, new_public_key: felt252, signature: Span<felt252>);
-    fn get_public_key(self: @DualCaseAccount) -> felt252;
-    fn is_valid_signature(
-        self: @DualCaseAccount, hash: felt252, signature: Array<felt252>
-    ) -> felt252;
-    fn supports_interface(self: @DualCaseAccount, interface_id: felt252) -> bool;
-}
-
-impl DualCaseAccountImpl of DualCaseAccountTrait {
-    fn set_public_key(self: @DualCaseAccount, new_public_key: felt252, signature: Span<felt252>) {
-        let mut args = array![new_public_key];
-        args.append_serde(signature);
-
-        try_selector_with_fallback(
-            *self.contract_address, selectors::set_public_key, selectors::setPublicKey, args.span()
-        )
-            .unwrap_syscall();
-    }
-
-    fn get_public_key(self: @DualCaseAccount) -> felt252 {
-        let args = array![];
-
-        try_selector_with_fallback(
-            *self.contract_address, selectors::get_public_key, selectors::getPublicKey, args.span()
-        )
-            .unwrap_and_cast()
-    }
-
-    fn is_valid_signature(
-        self: @DualCaseAccount, hash: felt252, signature: Array<felt252>
-    ) -> felt252 {
-        let mut args = array![hash];
-        args.append_serde(signature);
-
-        try_selector_with_fallback(
-            *self.contract_address,
-            selectors::is_valid_signature,
-            selectors::isValidSignature,
-            args.span()
-        )
-            .unwrap_and_cast()
-    }
-
-    fn supports_interface(self: @DualCaseAccount, interface_id: felt252) -> bool {
-        let args = array![interface_id];
-
-        call_contract_syscall(*self.contract_address, selectors::supports_interface, args.span())
-            .unwrap_and_cast()
-    }
-}
diff --git a/packages/account/src/dual_eth_account.cairo b/packages/account/src/dual_eth_account.cairo
deleted file mode 100644
index f305aa62d..000000000
--- a/packages/account/src/dual_eth_account.cairo
+++ /dev/null
@@ -1,73 +0,0 @@
-// SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts for Cairo v0.17.0 (account/dual_eth_account.cairo)
-
-use crate::interface::EthPublicKey;
-use openzeppelin_utils::UnwrapAndCast;
-use openzeppelin_utils::selectors;
-use openzeppelin_utils::serde::SerializedAppend;
-use openzeppelin_utils::try_selector_with_fallback;
-use starknet::ContractAddress;
-use starknet::SyscallResultTrait;
-use starknet::syscalls::call_contract_syscall;
-
-#[derive(Copy, Drop)]
-pub struct DualCaseEthAccount {
-    pub contract_address: ContractAddress
-}
-
-pub trait DualCaseEthAccountTrait {
-    fn set_public_key(
-        self: @DualCaseEthAccount, new_public_key: EthPublicKey, signature: Span<felt252>
-    );
-    fn get_public_key(self: @DualCaseEthAccount) -> EthPublicKey;
-    fn is_valid_signature(
-        self: @DualCaseEthAccount, hash: felt252, signature: Array<felt252>
-    ) -> felt252;
-    fn supports_interface(self: @DualCaseEthAccount, interface_id: felt252) -> bool;
-}
-
-impl DualCaseEthAccountImpl of DualCaseEthAccountTrait {
-    fn set_public_key(
-        self: @DualCaseEthAccount, new_public_key: EthPublicKey, signature: Span<felt252>
-    ) {
-        let mut args = array![];
-        args.append_serde(new_public_key);
-        args.append_serde(signature);
-
-        try_selector_with_fallback(
-            *self.contract_address, selectors::set_public_key, selectors::setPublicKey, args.span()
-        )
-            .unwrap_syscall();
-    }
-
-    fn get_public_key(self: @DualCaseEthAccount) -> EthPublicKey {
-        let args = array![];
-
-        try_selector_with_fallback(
-            *self.contract_address, selectors::get_public_key, selectors::getPublicKey, args.span()
-        )
-            .unwrap_and_cast()
-    }
-
-    fn is_valid_signature(
-        self: @DualCaseEthAccount, hash: felt252, signature: Array<felt252>
-    ) -> felt252 {
-        let mut args = array![hash];
-        args.append_serde(signature);
-
-        try_selector_with_fallback(
-            *self.contract_address,
-            selectors::is_valid_signature,
-            selectors::isValidSignature,
-            args.span()
-        )
-            .unwrap_and_cast()
-    }
-
-    fn supports_interface(self: @DualCaseEthAccount, interface_id: felt252) -> bool {
-        let args = array![interface_id];
-
-        call_contract_syscall(*self.contract_address, selectors::supports_interface, args.span())
-            .unwrap_and_cast()
-    }
-}
diff --git a/packages/account/src/extensions/src9/snip12_utils.cairo b/packages/account/src/extensions/src9/snip12_utils.cairo
index 6a397dfe5..b2d81132c 100644
--- a/packages/account/src/extensions/src9/snip12_utils.cairo
+++ b/packages/account/src/extensions/src9/snip12_utils.cairo
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// OpenZeppelin Contracts for Cairo v0.17.0 (account/extensions/src9/snip12.cairo)
+// OpenZeppelin Contracts for Cairo v0.17.0 (account/extensions/src9/snip12_utils.cairo)
 
 use core::hash::{HashStateTrait, HashStateExTrait};
 use core::poseidon::{PoseidonTrait, poseidon_hash_span};
diff --git a/packages/account/src/extensions/src9/src9.cairo b/packages/account/src/extensions/src9/src9.cairo
index e9b7b3afc..468e1475f 100644
--- a/packages/account/src/extensions/src9/src9.cairo
+++ b/packages/account/src/extensions/src9/src9.cairo
@@ -14,7 +14,7 @@ pub mod SRC9Component {
     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_account::interface::{ISRC6Dispatcher, ISRC6DispatcherTrait};
     use openzeppelin_introspection::src5::SRC5Component::InternalTrait as SRC5InternalTrait;
     use openzeppelin_introspection::src5::SRC5Component;
     use openzeppelin_utils::cryptography::snip12::{OffchainMessageHash, SNIP12Metadata};
@@ -105,7 +105,7 @@ pub mod SRC9Component {
 
             // Make this component agnostic to the account implementation, as long
             // as the contract implements the SRC6 interface.
-            let is_valid_signature_felt = DualCaseAccount { contract_address: this }
+            let is_valid_signature_felt = ISRC6Dispatcher { contract_address: this }
                 .is_valid_signature(outside_tx_hash, signature.into());
 
             // Check either 'VALID' or true for backwards compatibility.
diff --git a/packages/account/src/lib.cairo b/packages/account/src/lib.cairo
index 6e4ed8a32..366b3eb8f 100644
--- a/packages/account/src/lib.cairo
+++ b/packages/account/src/lib.cairo
@@ -1,6 +1,4 @@
 pub mod account;
-pub mod dual_account;
-pub mod dual_eth_account;
 pub mod eth_account;
 pub mod extensions;
 pub mod interface;
diff --git a/packages/token/src/erc20/extensions/erc20_votes.cairo b/packages/token/src/erc20/extensions/erc20_votes.cairo
index a41e6b811..b1dfa1fcb 100644
--- a/packages/token/src/erc20/extensions/erc20_votes.cairo
+++ b/packages/token/src/erc20/extensions/erc20_votes.cairo
@@ -19,7 +19,7 @@ pub mod ERC20VotesComponent {
     use core::num::traits::Zero;
     use crate::erc20::ERC20Component;
     use crate::erc20::interface::IERC20;
-    use openzeppelin_account::dual_account::{DualCaseAccount, DualCaseAccountTrait};
+    use openzeppelin_account::interface::{ISRC6Dispatcher, ISRC6DispatcherTrait};
     use openzeppelin_governance::utils::interfaces::IVotes;
     use openzeppelin_utils::nonces::NoncesComponent::InternalTrait as NoncesInternalTrait;
     use openzeppelin_utils::nonces::NoncesComponent;
@@ -162,7 +162,7 @@ pub mod ERC20VotesComponent {
             let delegation = Delegation { delegatee, nonce, expiry };
             let hash = delegation.get_message_hash(delegator);
 
-            let is_valid_signature_felt = DualCaseAccount { contract_address: delegator }
+            let is_valid_signature_felt = ISRC6Dispatcher { contract_address: delegator }
                 .is_valid_signature(hash, signature);
 
             // Check either 'VALID' or true for backwards compatibility.


Test patch:
diff --git a/packages/account/src/tests.cairo b/packages/account/src/tests.cairo
index c02171f01..660465d02 100644
--- a/packages/account/src/tests.cairo
+++ b/packages/account/src/tests.cairo
@@ -4,10 +4,6 @@ pub(crate) mod mocks;
 #[cfg(test)]
 mod test_account;
 #[cfg(test)]
-mod test_dual_account;
-#[cfg(test)]
-mod test_dual_eth_account;
-#[cfg(test)]
 mod test_eth_account;
 #[cfg(test)]
 mod test_secp256k1;
diff --git a/packages/account/src/tests/mocks.cairo b/packages/account/src/tests/mocks.cairo
index 3d873c28b..e9e44bf5d 100644
--- a/packages/account/src/tests/mocks.cairo
+++ b/packages/account/src/tests/mocks.cairo
@@ -1,5 +1,4 @@
 pub(crate) mod account_mocks;
 pub(crate) mod eth_account_mocks;
-pub(crate) mod non_implementing_mock;
 pub(crate) mod simple_mock;
 pub(crate) mod src9_mocks;
diff --git a/packages/account/src/tests/mocks/account_mocks.cairo b/packages/account/src/tests/mocks/account_mocks.cairo
index faddfdf9f..893a339c1 100644
--- a/packages/account/src/tests/mocks/account_mocks.cairo
+++ b/packages/account/src/tests/mocks/account_mocks.cairo
@@ -43,181 +43,3 @@ pub(crate) mod DualCaseAccountMock {
         self.account.initializer(public_key);
     }
 }
-
-#[starknet::contract(account)]
-pub(crate) mod SnakeAccountMock {
-    use crate::AccountComponent;
-    use openzeppelin_introspection::src5::SRC5Component;
-
-    component!(path: AccountComponent, storage: account, event: AccountEvent);
-    component!(path: SRC5Component, storage: src5, event: SRC5Event);
-
-    // Account
-    #[abi(embed_v0)]
-    impl SRC6Impl = AccountComponent::SRC6Impl<ContractState>;
-    #[abi(embed_v0)]
-    impl PublicKeyImpl = AccountComponent::PublicKeyImpl<ContractState>;
-    impl AccountInternalImpl = AccountComponent::InternalImpl<ContractState>;
-
-    // SCR5
-    #[abi(embed_v0)]
-    impl SRC5Impl = SRC5Component::SRC5Impl<ContractState>;
-
-    #[storage]
-    pub struct Storage {
-        #[substorage(v0)]
-        pub account: AccountComponent::Storage,
-        #[substorage(v0)]
-        pub src5: SRC5Component::Storage
-    }
-
-    #[event]
-    #[derive(Drop, starknet::Event)]
-    enum Event {
-        #[flat]
-        AccountEvent: AccountComponent::Event,
-        #[flat]
-        SRC5Event: SRC5Component::Event
-    }
-
-    #[constructor]
-    fn constructor(ref self: ContractState, public_key: felt252) {
-        self.account.initializer(public_key);
-    }
-}
-
-#[starknet::contract(account)]
-pub(crate) mod CamelAccountMock {
-    use crate::AccountComponent;
-    use openzeppelin_introspection::src5::SRC5Component;
-    use starknet::account::Call;
-
-    component!(path: AccountComponent, storage: account, event: AccountEvent);
-    component!(path: SRC5Component, storage: src5, event: SRC5Event);
-
-    // Account
-    #[abi(embed_v0)]
-    impl SRC6CamelOnlyImpl = AccountComponent::SRC6CamelOnlyImpl<ContractState>;
-    #[abi(embed_v0)]
-    impl PublicKeyCamelImpl = AccountComponent::PublicKeyCamelImpl<ContractState>;
-    impl SRC6Impl = AccountComponent::SRC6Impl<ContractState>;
-    impl AccountInternalImpl = AccountComponent::InternalImpl<ContractState>;
-
-    // SCR5
-    #[abi(embed_v0)]
-    impl SRC5Impl = SRC5Component::SRC5Impl<ContractState>;
-
-    #[storage]
-    pub struct Storage {
-        #[substorage(v0)]
-        pub account: AccountComponent::Storage,
-        #[substorage(v0)]
-        pub src5: SRC5Component::Storage
-    }
-
-    #[event]
-    #[derive(Drop, starknet::Event)]
-    enum Event {
-        #[flat]
-        AccountEvent: AccountComponent::Event,
-        #[flat]
-        SRC5Event: SRC5Component::Event
-    }
-
-    #[constructor]
-    fn constructor(ref self: ContractState, publicKey: felt252) {
-        self.account.initializer(publicKey);
-    }
-
-    #[abi(per_item)]
-    #[generate_trait]
-    impl ExternalImpl of ExternalTrait {
-        #[external(v0)]
-        fn __execute__(self: @ContractState, mut calls: Array<Call>) -> Array<Span<felt252>> {
-            self.account.__execute__(calls)
-        }
-
-        #[external(v0)]
-        fn __validate__(self: @ContractState, mut calls: Array<Call>) -> felt252 {
-            self.account.__validate__(calls)
-        }
-    }
-}
-
-// Although these modules are designed to panic, functions
-// still need a valid return value. We chose:
-//
-// 3 for felt252
-// false for bool
-
-#[starknet::contract]
-pub(crate) mod SnakeAccountPanicMock {
-    #[storage]
-    pub struct Storage {}
-
-    #[abi(per_item)]
-    #[generate_trait]
-    impl ExternalImpl of ExternalTrait {
-        #[external(v0)]
-        fn set_public_key(
-            ref self: ContractState, new_public_key: felt252, signature: Span<felt252>
-        ) {
-            panic!("Some error");
-        }
-
-        #[external(v0)]
-        fn get_public_key(self: @ContractState) -> felt252 {
-            panic!("Some error");
-            3
-        }
-
-        #[external(v0)]
-        fn is_valid_signature(
-            self: @ContractState, hash: felt252, signature: Array<felt252>
-        ) -> felt252 {
-            panic!("Some error");
-            3
-        }
-
-        #[external(v0)]
-        fn supports_interface(self: @ContractState, interface_id: felt252) -> bool {
-            panic!("Some error");
-            false
-        }
-    }
-}
-
-#[starknet::contract]
-pub(crate) mod CamelAccountPanicMock {
-    #[storage]
-    pub struct Storage {}
-
-    #[abi(per_item)]
-    #[generate_trait]
-    impl ExternalImpl of ExternalTrait {
-        #[external(v0)]
-        fn setPublicKey(ref self: ContractState, newPublicKey: felt252, signature: Span<felt252>) {
-            panic!("Some error");
-        }
-
-        #[external(v0)]
-        fn getPublicKey(self: @ContractState) -> felt252 {
-            panic!("Some error");
-            3
-        }
-
-        #[external(v0)]
-        fn isValidSignature(
-            self: @ContractState, hash: felt252, signature: Array<felt252>
-        ) -> felt252 {
-            panic!("Some error");
-            3
-        }
-
-        #[external(v0)]
-        fn supportsInterface(self: @ContractState, interfaceId: felt252) -> bool {
-            panic!("Some error");
-            false
-        }
-    }
-}
diff --git a/packages/account/src/tests/mocks/eth_account_mocks.cairo b/packages/account/src/tests/mocks/eth_account_mocks.cairo
index 2787e76d1..71ddeb787 100644
--- a/packages/account/src/tests/mocks/eth_account_mocks.cairo
+++ b/packages/account/src/tests/mocks/eth_account_mocks.cairo
@@ -41,188 +41,3 @@ pub(crate) mod DualCaseEthAccountMock {
         self.eth_account.initializer(public_key);
     }
 }
-
-#[starknet::contract(account)]
-pub(crate) mod SnakeEthAccountMock {
-    use crate::EthAccountComponent;
-    use crate::interface::EthPublicKey;
-    use openzeppelin_introspection::src5::SRC5Component;
-
-    component!(path: EthAccountComponent, storage: eth_account, event: EthAccountEvent);
-    component!(path: SRC5Component, storage: src5, event: SRC5Event);
-
-    #[abi(embed_v0)]
-    impl SRC6Impl = EthAccountComponent::SRC6Impl<ContractState>;
-    #[abi(embed_v0)]
-    impl PublicKeyImpl = EthAccountComponent::PublicKeyImpl<ContractState>;
-    #[abi(embed_v0)]
-    impl SRC5Impl = SRC5Component::SRC5Impl<ContractState>;
-    impl EthAccountInternalImpl = EthAccountComponent::InternalImpl<ContractState>;
-
-    #[storage]
-    pub struct Storage {
-        #[substorage(v0)]
-        pub eth_account: EthAccountComponent::Storage,
-        #[substorage(v0)]
-        pub src5: SRC5Component::Storage
-    }
-
-    #[event]
-    #[derive(Drop, starknet::Event)]
-    enum Event {
-        #[flat]
-        EthAccountEvent: EthAccountComponent::Event,
-        #[flat]
-        SRC5Event: SRC5Component::Event
-    }
-
-    #[constructor]
-    fn constructor(ref self: ContractState, public_key: EthPublicKey) {
-        self.eth_account.initializer(public_key);
-    }
-}
-
-#[starknet::contract(account)]
-pub(crate) mod CamelEthAccountMock {
-    use crate::EthAccountComponent;
-    use crate::interface::EthPublicKey;
-    use openzeppelin_introspection::src5::SRC5Component;
-    use starknet::account::Call;
-
-    component!(path: EthAccountComponent, storage: eth_account, event: EthAccountEvent);
-    component!(path: SRC5Component, storage: src5, event: SRC5Event);
-
-    #[abi(embed_v0)]
-    impl SRC6CamelOnlyImpl = EthAccountComponent::SRC6CamelOnlyImpl<ContractState>;
-    #[abi(embed_v0)]
-    impl PublicKeyCamelImpl =
-        EthAccountComponent::PublicKeyCamelImpl<ContractState>;
-    #[abi(embed_v0)]
-    impl SRC5Impl = SRC5Component::SRC5Impl<ContractState>;
-    impl SRC6Impl = EthAccountComponent::SRC6Impl<ContractState>;
-    impl EthAccountInternalImpl = EthAccountComponent::InternalImpl<ContractState>;
-
-    #[storage]
-    pub struct Storage {
-        #[substorage(v0)]
-        pub eth_account: EthAccountComponent::Storage,
-        #[substorage(v0)]
-        pub src5: SRC5Component::Storage
-    }
-
-    #[event]
-    #[derive(Drop, starknet::Event)]
-    enum Event {
-        #[flat]
-        EthAccountEvent: EthAccountComponent::Event,
-        #[flat]
-        SRC5Event: SRC5Component::Event
-    }
-
-    #[constructor]
-    fn constructor(ref self: ContractState, publicKey: EthPublicKey) {
-        self.eth_account.initializer(publicKey);
-    }
-
-    #[abi(per_item)]
-    #[generate_trait]
-    impl ExternalImpl of ExternalTrait {
-        #[external(v0)]
-        fn __execute__(self: @ContractState, mut calls: Array<Call>) -> Array<Span<felt252>> {
-            self.eth_account.__execute__(calls)
-        }
-
-        #[external(v0)]
-        fn __validate__(self: @ContractState, mut calls: Array<Call>) -> felt252 {
-            self.eth_account.__validate__(calls)
-        }
-    }
-}
-
-// Although these modules are designed to panic, functions
-// still need a valid return value. We chose:
-//
-// 3 for felt252
-// false for bool
-
-#[starknet::contract]
-pub(crate) mod SnakeEthAccountPanicMock {
-    use crate::interface::EthPublicKey;
-    use starknet::SyscallResultTrait;
-    use starknet::secp256_trait::Secp256Trait;
-
-    #[storage]
-    pub struct Storage {}
-
-    #[abi(per_item)]
-    #[generate_trait]
-    impl ExternalImpl of ExternalTrait {
-        #[external(v0)]
-        fn set_public_key(
-            ref self: ContractState, new_public_key: EthPublicKey, signature: Span<felt252>
-        ) {
-            panic!("Some error");
-        }
-
-        #[external(v0)]
-        fn get_public_key(self: @ContractState) -> EthPublicKey {
-            panic!("Some error");
-            Secp256Trait::secp256_ec_new_syscall(3, 3).unwrap_syscall().unwrap()
-        }
-
-        #[external(v0)]
-        fn is_valid_signature(
-            self: @ContractState, hash: felt252, signature: Array<felt252>
-        ) -> felt252 {
-            panic!("Some error");
-            3
-        }
-
-        #[external(v0)]
-        fn supports_interface(self: @ContractState, interface_id: felt252) -> bool {
-            panic!("Some error");
-            false
-        }
-    }
-}
-
-#[starknet::contract]
-pub(crate) mod CamelEthAccountPanicMock {
-    use crate::interface::EthPublicKey;
-    use starknet::SyscallResultTrait;
-    use starknet::secp256_trait::Secp256Trait;
-
-    #[storage]
-    pub struct Storage {}
-
-    #[abi(per_item)]
-    #[generate_trait]
-    impl ExternalImpl of ExternalTrait {
-        #[external(v0)]
-        fn setPublicKey(
-            ref self: ContractState, newPublicKey: EthPublicKey, signature: Span<felt252>
-        ) {
-            panic!("Some error");
-        }
-
-        #[external(v0)]
-        fn getPublicKey(self: @ContractState) -> EthPublicKey {
-            panic!("Some error");
-            Secp256Trait::secp256_ec_new_syscall(3, 3).unwrap_syscall().unwrap()
-        }
-
-        #[external(v0)]
-        fn isValidSignature(
-            self: @ContractState, hash: felt252, signature: Array<felt252>
-        ) -> felt252 {
-            panic!("Some error");
-            3
-        }
-
-        #[external(v0)]
-        fn supportsInterface(self: @ContractState, interfaceId: felt252) -> bool {
-            panic!("Some error");
-            false
-        }
-    }
-}
diff --git a/packages/account/src/tests/mocks/non_implementing_mock.cairo b/packages/account/src/tests/mocks/non_implementing_mock.cairo
deleted file mode 100644
index 67d632c72..000000000
--- a/packages/account/src/tests/mocks/non_implementing_mock.cairo
+++ /dev/null
@@ -1,10 +0,0 @@
-#[starknet::contract]
-pub(crate) mod NonImplementingMock {
-    #[storage]
-    pub struct Storage {}
-
-    #[external(v0)]
-    fn nope(self: @ContractState) -> bool {
-        false
-    }
-}
diff --git a/packages/account/src/tests/test_dual_account.cairo b/packages/account/src/tests/test_dual_account.cairo
deleted file mode 100644
index 467f0878e..000000000
--- a/packages/account/src/tests/test_dual_account.cairo
+++ /dev/null
@@ -1,220 +0,0 @@
-use crate::dual_account::{DualCaseAccountTrait, DualCaseAccount};
-use crate::interface::{AccountABIDispatcherTrait, AccountABIDispatcher};
-use openzeppelin_introspection::interface::ISRC5_ID;
-
-use openzeppelin_test_common::account::{get_accept_ownership_signature};
-use openzeppelin_testing as utils;
-use openzeppelin_testing::constants::TRANSACTION_HASH;
-use openzeppelin_testing::constants::stark::{KEY_PAIR, KEY_PAIR_2};
-use openzeppelin_testing::signing::{StarkKeyPair, StarkSerializedSigning};
-use snforge_std::{start_cheat_caller_address};
-
-//
-// Setup
-//
-
-fn setup_snake(key_pair: StarkKeyPair) -> (DualCaseAccount, AccountABIDispatcher) {
-    let calldata = array![key_pair.public_key];
-    let contract_address = utils::declare_and_deploy("SnakeAccountMock", calldata);
-    (DualCaseAccount { contract_address }, AccountABIDispatcher { contract_address })
-}
-
-fn setup_camel(key_pair: StarkKeyPair) -> (DualCaseAccount, AccountABIDispatcher) {
-    let calldata = array![key_pair.public_key];
-    let contract_address = utils::declare_and_deploy("CamelAccountMock", calldata);
-    (DualCaseAccount { contract_address }, AccountABIDispatcher { contract_address })
-}
-
-fn setup_non_account() -> DualCaseAccount {
-    let calldata = array![];
-    let contract_address = utils::declare_and_deploy("NonImplementingMock", calldata);
-    DualCaseAccount { contract_address }
-}
-
-fn setup_account_panic() -> (DualCaseAccount, DualCaseAccount) {
-    let snake_target = utils::declare_and_deploy("SnakeAccountPanicMock", array![]);
-    let camel_target = utils::declare_and_deploy("CamelAccountPanicMock", array![]);
-    (
-        DualCaseAccount { contract_address: snake_target },
-        DualCaseAccount { contract_address: camel_target }
-    )
-}
-
-//
-// snake_case target
-//
-
-#[test]
-fn test_dual_set_public_key() {
-    let key_pair = KEY_PAIR();
-    let (snake_dispatcher, target) = setup_snake(key_pair);
-    let new_key_pair = KEY_PAIR_2();
-    let signature = get_accept_ownership_signature(
-        snake_dispatcher.contract_address, key_pair.public_key, new_key_pair
-    );
-    start_cheat_caller_address(target.contract_address, target.contract_address);
-
-    snake_dispatcher.set_public_key(new_key_pair.public_key, signature);
-
-    assert_eq!(target.get_public_key(), new_key_pair.public_key);
-}
-
-#[test]
-#[ignore] // REASON: should_panic attribute not fit for complex panic messages.
-#[should_panic(expected: ('ENTRYPOINT_NOT_FOUND',))]
-fn test_dual_no_set_public_key() {
-    let dispatcher = setup_non_account();
-    let new_public_key = KEY_PAIR_2().public_key;
-    dispatcher.set_public_key(new_public_key, array![].span());
-}
-
-#[test]
-#[should_panic(expected: "Some error")]
-fn test_dual_set_public_key_exists_and_panics() {
-    let (snake_dispatcher, _) = setup_account_panic();
-    let new_public_key = KEY_PAIR_2().public_key;
-    snake_dispatcher.set_public_key(new_public_key, array![].span());
-}
-
-#[test]
-fn test_dual_get_public_key() {
-    let key_pair = KEY_PAIR();
-    let (snake_dispatcher, _) = setup_snake(key_pair);
-    let expected_public_key = key_pair.public_key;
-    assert_eq!(snake_dispatcher.get_public_key(), expected_public_key);
-}
-
-#[test]
-#[ignore] // REASON: should_panic attribute not fit for complex panic messages.
-#[should_panic(expected: ('ENTRYPOINT_NOT_FOUND',))]
-fn test_dual_no_get_public_key() {
-    let dispatcher = setup_non_account();
-    dispatcher.get_public_key();
-}
-
-#[test]
-#[should_panic(expected: "Some error")]
-fn test_dual_get_public_key_exists_and_panics() {
-    let (snake_dispatcher, _) = setup_account_panic();
-    snake_dispatcher.get_public_key();
-}
-
-#[test]
-fn test_dual_is_valid_signature() {
-    let key_pair = KEY_PAIR();
-    let (snake_dispatcher, _) = setup_snake(key_pair);
-    let tx_hash = TRANSACTION_HASH;
-    let serialized_signature = key_pair.serialized_sign(tx_hash);
-
-    let is_valid = snake_dispatcher.is_valid_signature(tx_hash, serialized_signature);
-    assert_eq!(is_valid, starknet::VALIDATED);
-}
-
-#[test]
-#[ignore] // REASON: should_panic attribute not fit for complex panic messages.
-#[should_panic(expected: ('ENTRYPOINT_NOT_FOUND',))]
-fn test_dual_no_is_valid_signature() {
-    let signature = array![];
-
-    let dispatcher = setup_non_account();
-    dispatcher.is_valid_signature(TRANSACTION_HASH, signature);
-}
-
-#[test]
-#[should_panic(expected: "Some error")]
-fn test_dual_is_valid_signature_exists_and_panics() {
-    let signature = array![];
-    let (snake_dispatcher, _) = setup_account_panic();
-
-    snake_dispatcher.is_valid_signature(TRANSACTION_HASH, signature);
-}
-
-#[test]
-fn test_dual_supports_interface() {
-    let (snake_dispatcher, _) = setup_snake(KEY_PAIR());
-    let supports_isrc5 = snake_dispatcher.supports_interface(ISRC5_ID);
-    assert!(supports_isrc5);
-}
-
-#[test]
-#[ignore] // REASON: should_panic attribute not fit for complex panic messages.
-#[should_panic(expected: ('ENTRYPOINT_NOT_FOUND',))]
-fn test_dual_no_supports_interface() {
-    let dispatcher = setup_non_account();
-    dispatcher.supports_interface(ISRC5_ID);
-}
-
-#[test]
-#[should_panic(expected: "Some error")]
-fn test_dual_supports_interface_exists_and_panics() {
-    let (snake_dispatcher, _) = setup_account_panic();
-    snake_dispatcher.supports_interface(ISRC5_ID);
-}
-
-//
-// camelCase target
-//
-
-#[test]
-#[ignore] // REASON: foundry entrypoint_not_found error message inconsistent with mainnet.
-fn test_dual_setPublicKey() {
-    let key_pair = KEY_PAIR();
-    let (camel_dispatcher, target) = setup_camel(key_pair);
-    let new_key_pair = KEY_PAIR_2();
-    let signature = get_accept_ownership_signature(
-        camel_dispatcher.contract_address, key_pair.public_key, new_key_pair
-    );
-    start_cheat_caller_address(target.contract_address, target.contract_address);
-
-    camel_dispatcher.set_public_key(new_key_pair.public_key, signature);
-
-    assert_eq!(target.getPublicKey(), new_key_pair.public_key);
-}
-
-#[test]
-#[ignore] // REASON: foundry entrypoint_not_found error message inconsistent with mainnet.
-#[should_panic(expected: "Some error")]
-fn test_dual_setPublicKey_exists_and_panics() {
-    let (_, camel_dispatcher) = setup_account_panic();
-    let new_public_key = KEY_PAIR_2().public_key;
-    camel_dispatcher.set_public_key(new_public_key, array![].span());
-}
-
-#[test]
-#[ignore] // REASON: foundry entrypoint_not_found error message inconsistent with mainnet.
-fn test_dual_getPublicKey() {
-    let key_pair = KEY_PAIR();
-    let (camel_dispatcher, _) = setup_camel(key_pair);
-    let expected_public_key = key_pair.public_key;
-    assert_eq!(camel_dispatcher.get_public_key(), expected_public_key);
-}
-
-#[test]
-#[ignore] // REASON: foundry entrypoint_not_found error message inconsistent with mainnet.
-#[should_panic(expected: "Some error")]
-fn test_dual_getPublicKey_exists_and_panics() {
-    let (_, camel_dispatcher) = setup_account_panic();
-    camel_dispatcher.get_public_key();
-}
-
-#[test]
-#[ignore] // REASON: foundry entrypoint_not_found error message inconsistent with mainnet.
-fn test_dual_isValidSignature() {
-    let key_pair = KEY_PAIR();
-    let (camel_dispatcher, _) = setup_camel(key_pair);
-    let tx_hash = TRANSACTION_HASH;
-    let serialized_signature = key_pair.serialized_sign(tx_hash);
-
-    let is_valid = camel_dispatcher.is_valid_signature(tx_hash, serialized_signature);
-    assert_eq!(is_valid, starknet::VALIDATED);
-}
-
-#[test]
-#[ignore] // REASON: foundry entrypoint_not_found error message inconsistent with mainnet.
-#[should_panic(expected: "Some error")]
-fn test_dual_isValidSignature_exists_and_panics() {
-    let signature = array![];
-
-    let (_, camel_dispatcher) = setup_account_panic();
-    camel_dispatcher.is_valid_signature(TRANSACTION_HASH, signature);
-}
diff --git a/packages/account/src/tests/test_dual_eth_account.cairo b/packages/account/src/tests/test_dual_eth_account.cairo
deleted file mode 100644
index c62495448..000000000
--- a/packages/account/src/tests/test_dual_eth_account.cairo
+++ /dev/null
@@ -1,220 +0,0 @@
-use crate::dual_eth_account::{DualCaseEthAccountTrait, DualCaseEthAccount};
-use crate::interface::{EthAccountABIDispatcherTrait, EthAccountABIDispatcher};
-use crate::utils::secp256k1::{DebugSecp256k1Point, Secp256k1PointPartialEq};
-use openzeppelin_introspection::interface::ISRC5_ID;
-
-use openzeppelin_test_common::eth_account::get_accept_ownership_signature;
-use openzeppelin_testing as utils;
-use openzeppelin_testing::constants::TRANSACTION_HASH;
-use openzeppelin_testing::constants::secp256k1::{KEY_PAIR, KEY_PAIR_2};
-use openzeppelin_testing::signing::{Secp256k1KeyPair, Secp256k1SerializedSigning};
-use openzeppelin_utils::serde::SerializedAppend;
-use snforge_std::start_cheat_caller_address;
-
-//
-// Setup
-//
-
-fn setup_snake(key_pair: Secp256k1KeyPair) -> (DualCaseEthAccount, EthAccountABIDispatcher) {
-    let mut calldata = array![];
-    calldata.append_serde(key_pair.public_key);
-
-    let contract_address = utils::declare_and_deploy("SnakeEthAccountMock", calldata);
-    (DualCaseEthAccount { contract_address }, EthAccountABIDispatcher { contract_address })
-}
-
-fn setup_camel(key_pair: Secp256k1KeyPair) -> (DualCaseEthAccount, EthAccountABIDispatcher) {
-    let mut calldata = array![];
-    calldata.append_serde(key_pair.public_key);
-
-    let contract_address = utils::declare_and_deploy("CamelEthAccountMock", calldata);
-    (DualCaseEthAccount { contract_address }, EthAccountABIDispatcher { contract_address })
-}
-
-fn setup_non_account() -> DualCaseEthAccount {
-    let calldata = array![];
-    let contract_address = utils::declare_and_deploy("NonImplementingMock", calldata);
-    DualCaseEthAccount { contract_address }
-}
-
-fn setup_account_panic() -> (DualCaseEthAccount, DualCaseEthAccount) {
-    let snake_target = utils::declare_and_deploy("SnakeEthAccountPanicMock", array![]);
-    let camel_target = utils::declare_and_deploy("CamelEthAccountPanicMock", array![]);
-    (
-        DualCaseEthAccount { contract_address: snake_target },
-        DualCaseEthAccount { contract_address: camel_target }
-    )
-}
-
-//
-// snake_case target
-//
-
-#[test]
-fn test_dual_set_public_key() {
-    let key_pair = KEY_PAIR();
-    let (snake_dispatcher, target) = setup_snake(key_pair);
-    let contract_address = snake_dispatcher.contract_address;
-
-    let new_key_pair = KEY_PAIR_2();
-    start_cheat_caller_address(contract_address, contract_address);
-    let signature = get_accept_ownership_signature(
-        contract_address, key_pair.public_key, new_key_pair
-    );
-    snake_dispatcher.set_public_key(new_key_pair.public_key, signature);
-
-    assert_eq!(target.get_public_key(), new_key_pair.public_key);
-}
-
-#[test]
-#[ignore] // REASON: should_panic attribute not fit for complex panic messages.
-#[should_panic(expected: ('ENTRYPOINT_NOT_FOUND',))]
-fn test_dual_no_set_public_key() {
-    let dispatcher = setup_non_account();
-    dispatcher.set_public_key(KEY_PAIR().public_key, array![].span());
-}
-
-#[test]
-#[should_panic(expected: "Some error")]
-fn test_dual_set_public_key_exists_and_panics() {
-    let (dispatcher, _) = setup_account_panic();
-    dispatcher.set_public_key(KEY_PAIR().public_key, array![].span());
-}
-
-#[test]
-fn test_dual_get_public_key() {
-    let key_pair = KEY_PAIR();
-    let (snake_dispatcher, _) = setup_snake(key_pair);
-    assert_eq!(snake_dispatcher.get_public_key(), key_pair.public_key);
-}
-
-#[test]
-#[ignore] // REASON: should_panic attribute not fit for complex panic messages.
-#[should_panic(expected: ('ENTRYPOINT_NOT_FOUND',))]
-fn test_dual_no_get_public_key() {
-    let dispatcher = setup_non_account();
-    dispatcher.get_public_key();
-}
-
-#[test]
-#[should_panic(expected: "Some error")]
-fn test_dual_get_public_key_exists_and_panics() {
-    let (dispatcher, _) = setup_account_panic();
-    dispatcher.get_public_key();
-}
-
-#[test]
-fn test_dual_is_valid_signature() {
-    let key_pair = KEY_PAIR();
-    let (snake_dispatcher, _) = setup_snake(key_pair);
-
-    let serialized_signature = key_pair.serialized_sign(TRANSACTION_HASH.into());
-    let is_valid = snake_dispatcher.is_valid_signature(TRANSACTION_HASH, serialized_signature);
-    assert_eq!(is_valid, starknet::VALIDATED);
-}
-
-#[test]
-#[ignore] // REASON: should_panic attribute not fit for complex panic messages.
-#[should_panic(expected: ('ENTRYPOINT_NOT_FOUND',))]
-fn test_dual_no_is_valid_signature() {
-    let signature = array![];
-
-    let dispatcher = setup_non_account();
-    dispatcher.is_valid_signature(TRANSACTION_HASH, signature);
-}
-
-#[test]
-#[should_panic(expected: "Some error")]
-fn test_dual_is_valid_signature_exists_and_panics() {
-    let signature = array![];
-
-    let (dispatcher, _) = setup_account_panic();
-    dispatcher.is_valid_signature(TRANSACTION_HASH, signature);
-}
-
-#[test]
-fn test_dual_supports_interface() {
-    let (snake_dispatcher, _) = setup_snake(KEY_PAIR());
-    assert!(snake_dispatcher.supports_interface(ISRC5_ID), "Should implement ISRC5");
-}
-
-#[test]
-#[ignore] // REASON: should_panic attribute not fit for complex panic messages.
-#[should_panic(expected: ('ENTRYPOINT_NOT_FOUND',))]
-fn test_dual_no_supports_interface() {
-    let dispatcher = setup_non_account();
-    dispatcher.supports_interface(ISRC5_ID);
-}
-
-#[test]
-#[should_panic(expected: "Some error")]
-fn test_dual_supports_interface_exists_and_panics() {
-    let (dispatcher, _) = setup_account_panic();
-    dispatcher.supports_interface(ISRC5_ID);
-}
-
-//
-// camelCase target
-//
-
-#[test]
-#[ignore] // REASON: foundry entrypoint_not_found error message inconsistent with mainnet.
-fn test_dual_setPublicKey() {
-    let key_pair = KEY_PAIR();
-    let (camel_dispatcher, target) = setup_camel(key_pair);
-    let contract_address = camel_dispatcher.contract_address;
-
-    start_cheat_caller_address(contract_address, contract_address);
-    let new_key_pair = KEY_PAIR_2();
-    let signature = get_accept_ownership_signature(
-        contract_address, key_pair.public_key, new_key_pair
-    );
-
-    camel_dispatcher.set_public_key(new_key_pair.public_key, signature);
-    assert_eq!(target.getPublicKey(), new_key_pair.public_key);
-}
-
-#[test]
-#[ignore] // REASON: foundry entrypoint_not_found error message inconsistent with mainnet.
-#[should_panic(expected: "Some error")]
-fn test_dual_setPublicKey_exists_and_panics() {
-    let (_, dispatcher) = setup_account_panic();
-    dispatcher.set_public_key(KEY_PAIR_2().public_key, array![].span());
-}
-
-#[test]
-#[ignore] // REASON: foundry entrypoint_not_found error message inconsistent with mainnet.
-fn test_dual_getPublicKey() {
-    let key_pair = KEY_PAIR();
-    let (camel_dispatcher, _) = setup_camel(key_pair);
-    assert_eq!(camel_dispatcher.get_public_key(), key_pair.public_key);
-}
-
-#[test]
-#[ignore] // REASON: foundry entrypoint_not_found error message inconsistent with mainnet.
-#[should_panic(expected: "Some error")]
-fn test_dual_getPublicKey_exists_and_panics() {
-    let (_, dispatcher) = setup_account_panic();
-    dispatcher.get_public_key();
-}
-
-#[test]
-#[ignore] // REASON: foundry entrypoint_not_found error message inconsistent with mainnet.
-fn test_dual_isValidSignature() {
-    let key_pair = KEY_PAIR();
-    let (camel_dispatcher, _) = setup_camel(key_pair);
-
-    let serialized_signature = key_pair.serialized_sign(TRANSACTION_HASH.into());
-    let is_valid = camel_dispatcher.is_valid_signature(TRANSACTION_HASH, serialized_signature);
-    assert_eq!(is_valid, starknet::VALIDATED);
-}
-
-#[test]
-#[ignore] // REASON: foundry entrypoint_not_found error message inconsistent with mainnet.
-#[should_panic(expected: "Some error")]
-fn test_dual_isValidSignature_exists_and_panics() {
-    let signature = array![];
-
-    let (_, dispatcher) = setup_account_panic();
-    dispatcher.is_valid_signature(TRANSACTION_HASH, signature);
-}