Whenever I truffle deploy
my smart contracts, I get a message "duplicate contract names found for undefined". When I then try to interact with them, I get ReferenceError: <contract name> is undefined
, for every contract I have deployed.
I'm unable to use 'truffle compile' because of a fairly restrictive work proxy, so I'm using a custom .js script from here and running it with node compile
. The contracts are also from that page- contract Dog
and contract DogCollection
. When I deploy, I use truffle deploy --compile-none
to have it deploy the bytecode I've already compiled. I'm guessing this is where the error comes in. How can I modify how the contract names are defined when generating the bytecode?
$ node solcjs --version
0.5.16+commit.9c3226ce.Emscripten.clang
$ truffle version
Truffle v5.3.3 (core: 5.3.3)
Solidity v0.5.16 (solc-js)
Node v10.19.0
Web3.js v1.3.5