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.

Failing to verify contract: "Cannot find module"

See original GitHub issue
D:\oracle\onchain>yarn run truffle run verify Oracle --network ropsten --debug
yarn run v1.22.4
$ D:\oracle\onchain\node_modules\.bin\truffle run verify Oracle --network ropsten --debug
DEBUG logging is turned ON
Running truffle-plugin-verify v0.5.2
Verifying Oracle
Reading artifact file at D:\oracle\onchain\build\contracts\Oracle.json
Retrieving constructor parameters from https://api-ropsten.etherscan.io/api?apiKey=VALIDAPIKEY&module=account&action=txlist&address=0x97879655Da10D93EaDA1a35665adeB94834A9fB3&page=1&sort=asc&offset=1
Constructor parameters retrieved: 0x
Cannot find module '/D/oracle/onchain/contracts/Oracle.sol'
Require stack:
- D:\oracle\onchain\node_modules\truffle-plugin-verify\verify.js
- D:\oracle\onchain\node_modules\original-require\index.js
- D:\oracle\onchain\node_modules\truffle\build\cli.bundled.js
Failed to verify 1 contract(s): Oracle

I’m trying to verify my contract but the plugin doesn’t find it,

D:\oracle\onchain\contracts>ls
Migrations.sol  Oracle.sol

I am running on windows10 with node v12.18.0, and the lastest versions of truffle and truffle-plugin-verify How can I solve this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:28 (21 by maintainers)

github_iconTop GitHub Comments

3reactions
rkaliscommented, Dec 21, 2020

Great! Thanks for the help everyone in this thread! I just published v0.5.4 that fixes this library linking bug for Solidity >=0.7.5. It’s a bit convoluted since the truffle artifact doesn’t store the linked libraries’ source paths, so I had to read the libraries’ artifact files and get the required information from there. I’ve verified that it works for the MetaCoin + ConvertLib example on Mac and Windows.

I’m marking this issue as closed, but @niccolopetti please verify if verification is working for your project and feel free to re-open this issue or open a new issue if it still isn’t working.

2reactions
niccolopetticommented, Dec 21, 2020

It works, great job!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Doesn't work with latest `truffle` · Issue #92 - GitHub
Fails with Cannot find module 'project:/contracts/FooBarBaz.sol' error message. I guess it's because of this change in truffle .
Read more >
1 - Stack Overflow
If i try to verify the contract with truffle and the truffle-verfiy-plugin, I got the following error: Cannot find module ...
Read more >
Verifying contract on bsc testnet using truffle plugin verify fails
I am trying to verify the contract using ** truffle run verify ... Cannot find module ... Failed to verify 1 contract(s): MasterChef@ ......
Read more >
Error: Cannot find module 'ganache-cli' [closed]
1- Re-installing the latest version of ganache, the local test blockchain that I use to deploy my contract, develop my application in order ......
Read more >
Hardhat errors | Ethereum development environment for ...
You are trying to send a transaction with a locally managed account, and some parameters are missing. Please double check your transactions' parameters....
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