Failing to verify contract: "Cannot find module"
See original GitHub issueD:\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:
- Created 3 years ago
- Comments:28 (21 by maintainers)
Top 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 >
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

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.
It works, great job!