question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot publish ethpm package with dependencies

See original GitHub issue

Issue

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:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
frangiocommented, Mar 23, 2018

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?

0reactions
cgeweckecommented, Mar 30, 2018

@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!!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found