Cannot publish ethpm package with dependencies
See original GitHub issueIssue
Publishing an ethpm package (truffle publish
) works nicely with self-contained contracts (i.e. those that do not import any other contracts), but I can’t get it to work with contract imports.
Steps to Reproduce
I am importing a Token
contract here:
import "./Token.sol";
Note: importing from an ethpm install (i.e. import "tokens/Token.sol"
) has the same effect.
I instantiate a token in a function call here:
Token t;
t = Token(tokenAddress);
truffle compile
, truffle migrate
, and truffle deploy
all work fine.
Expected Behavior
truffle publish
should publish this package to ethpm
Actual Results
I get the following error:
ParsedContract.sol:64:5: DeclarationError: Identifier not found or not unique.
Token t;
^---^
Environment
- Operating System: OSX
- Truffle version: 4.0.1
- Ethereum client: INFURA (ropsten)
- node version: 8.6.0
- npm version: 5.3.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:7 (6 by maintainers)
Top Results From Across the Web
The Ethereum Package Manager - Brownie - Read the Docs
At its core, an ethPM package is a JSON object containing the ABI, ... Note that you cannot set include_dependencies to False while...
Read more >Brownie package manager: pm or ethpm
The first - pm - uses Brownie's own package manager. The second - ethpm - uses the Ethereum Package Manager, which is "a...
Read more >How to create EthPM package - Robonomics Network by Airalab
Although Truffle v3 is able to publish a package to EthPM it can't handle new versions of Solidity. Truffle 3.4.11 by default works...
Read more >Package Management via NPM - Truffle Suite
Package Management via NPM¶. Truffle comes standard with npm integration, and is aware of the node_modules directory in your project if it exists....
Read more >ethpm - npm
ethpm. TypeScript icon, indicating that this package has built-in type declarations. 0.1.0-next.32 • Public • Published 2 years ago.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We’re getting the same error in the OpenZeppelin repository. It started happening around version 1.4.0.
Does anyone from the Truffle team have any clue as to what could be happening?
@alex-miller-0 @frangio This should be fixed in
4.1.5
. Please report back if you continue to see this or have other issues publishing to ethpm.Thanks!!