Skip to content

Instantly share code, notes, and snippets.

@Man-Jain
Last active November 28, 2024 13:41
Show Gist options
  • Save Man-Jain/e9a7a53a87ac316763e34a4a4af1426a to your computer and use it in GitHub Desktop.
Save Man-Jain/e9a7a53a87ac316763e34a4a4af1426a to your computer and use it in GitHub Desktop.

Error 1

Same declaration in different contracts across dependencies.

Compiler run failed:
Error (2333): Identifier already declared.
 --> lib/modulekit/src/test/helpers/HelperBase.sol:7:10:
  |
7 | import { PackedUserOperation } from "../../external/ERC4337.sol";
  |          ^^^^^^^^^^^^^^^^^^^
Note: The previous declaration is here:
  --> node_modules/account-abstraction/contracts/interfaces/PackedUserOperation.sol:18:1:
   |
18 | struct PackedUserOperation {
   | ^ (Relevant source part starts here and spans across multiple lines).

Error 2

Compiler run failed:
Error (9097): Identifier already declared.
  --> lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:44:5:
   |
44 |     error OwnableInvalidOwner(address owner);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: The previous declaration is here:
  --> lib/openzeppelin-contracts/contracts/access/Ownable.sol:31:5:
   |
31 |     error OwnableInvalidOwner(address owner);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Error (9097): Identifier already declared.
  --> lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:39:5:
   |
39 |     error OwnableUnauthorizedAccount(address account);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: The previous declaration is here:
  --> lib/openzeppelin-contracts/contracts/access/Ownable.sol:26:5:
   |
26 |     error OwnableUnauthorizedAccount(address account);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Error 3

Version conflicts since one dependency is getting some other version of the same contract from a module

  --> node_modules/@hyperlane-xyz/core/contracts/client/MailboxClient.sol:46:13:
   |
46 |             Address.isContract(_contract),
   |             ^^^^^^^^^^^^^^^^^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment