Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Contract name collisions on truffle projects #1162

Closed
anxolin opened this issue Aug 1, 2018 · 1 comment
Closed

Contract name collisions on truffle projects #1162

anxolin opened this issue Aug 1, 2018 · 1 comment

Comments

@anxolin
Copy link
Contributor

anxolin commented Aug 1, 2018

Issue

Error compiling a contract that depends on two different truffle projects, if these dependency projects have a contract with the same name.

Steps to Reproduce

Follow the steps in:
https://github.com/anxolin/truffle-dep-error

In the example I try to compile CoolApp contract that depends on DepA contract (in ./depA project), and DepB contract (in ./depB project).

DepA depends on a contract called Token, and DepB depends on a different contract called also Token.

Since truffles tries to output the files in truffle/contract folder, it fails to compile the second Token contract.

DeclarationError: Identifier already declared.

Expected Behavior

To be able to depend on different contracts with the same name.

Actual Results

DeclarationError: Identifier already declared.

Environment

N/A

@gnidan
Copy link
Contributor

gnidan commented Sep 26, 2018

Closing this as duplicate of #1087

@gnidan gnidan closed this as completed Sep 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants