Tenderly / tenderly-cli

CLI tool for Smart Contract error tracking, monitoring and alerting.
https://tenderly.co
GNU General Public License v3.0
521 stars 137 forks source link

Couldn't read Truffle build files at: build/contracts #43

Open bigfootdeveloper opened 3 years ago

bigfootdeveloper commented 3 years ago

When I run "truffle push" from truffle directory I get this error, but the directory build/contracts exists and the .json files are there.

# tenderly push --debug
Setting up your project...
Trying OpenZeppelin config path: networks.js
couldn't read new OpenzeppelinConfig config file
Trying buidler config path: buidler.config.js
couldn't read new Buidler config file
Trying hardhat config path: hardhat.config.js
Trying hardhat ts config path: hardhat.config.ts
Trying brownie config path: brownie-config.yaml
Trying truffle config path: truffle-config.js
Analyzing Truffle configuration...
Trying truffle config path: /node/bigfoot-finance/contracts/truffle-config.js
Pushing Smart Contracts for project: bigfoot
unable to upload contracts: unable to get provider contracts: failed reading contract source file: open project:/contracts/bsc/BscMasterChef.sol: no such file or directory
Couldn't read Truffle build files at: build/contracts
BogdanHabic commented 3 years ago

Hey! This usually happens if Truffle has old artifacts in the build folder. Does this still happen if you delete the build folder and try again after re-deploy?

P. S. It should also be sufficient to delete the BscMasterChef.json file and that's it.

bigfootdeveloper commented 3 years ago

I deleted build directory and I did the complete compilation and migration.

But, it didn't work. Same error.

#tenderly push
Setting up your project...
Analyzing Truffle configuration...
Pushing Smart Contracts for project: bigfoot
Couldn't read Truffle build files at: build/contracts
root@bsctoken:/node/bigfoot-finance/contracts# tenderly push --debug
Setting up your project...
Trying OpenZeppelin config path: networks.js
couldn't read new OpenzeppelinConfig config file
Trying buidler config path: buidler.config.js
couldn't read new Buidler config file
Trying hardhat config path: hardhat.config.js
Trying hardhat ts config path: hardhat.config.ts
Trying brownie config path: brownie-config.yaml
Trying truffle config path: truffle-config.js
Analyzing Truffle configuration...
Trying truffle config path: /node/bigfoot-finance/contracts/truffle-config.js
Pushing Smart Contracts for project: bigfoot
unable to upload contracts: unable to get provider contracts: failed reading contract source file: open project:/contracts/bsc/BscBiswapVariables.sol: no such file or directory
Couldn't read Truffle build files at: build/contracts

May be that 'tenderly push' doesn't get relative path.

I am executing the order inside truffle directory, but the absolute path is /example/..../contracts.

May be a bug?

This is my folder structure

Screenshot
bigfootdeveloper commented 3 years ago

Nothing about this?

BogdanHabic commented 3 years ago

I'd need to look at the .json files. Is the project open source?

If not, I see two things we can do:

Bogdan

bigfootdeveloper commented 3 years ago

Sorry, but it's a private repository.

I attached here the build folder, no problem.

build.zip

BogdanHabic commented 3 years ago

@bigfootdeveloper just so you know, the build folder does contain source files, so you might want to delete this (I've downloaded it now).

bigfootdeveloper commented 3 years ago

It's not a problem. The source code will be available when I will deploy the contracts, but the repo contains more info and that was the reason for do it private.

It would be important to find the reason for the failure. I think that tenderly it's a good tool, but work with truffle it's a "must have".

If you need something more, please, request it.

Thanks in advance.

bigfootdeveloper commented 3 years ago

Nothing???

bigfootdeveloper commented 3 years ago

Nothing yet?

Vorh commented 3 years ago

Hello! I have the same problem...

OS Linux 5.14.11-arch1-1 Truffle v5.4.1 (core: 5.4.1) Solidity - 0.8.6 (solc-js) Node v12.0.0 Web3.js v1.4.0

Debug log: image

Vorh commented 3 years ago

@BogdanHabic hi, can you help please? :(

certifirm commented 3 years ago

Clearly, it's a bug. The contracts are in the folder but tenderly-cli doesn't found it.

I have the same problem too. Look at the date of this issue.

Malcador commented 3 years ago

Hey guys, could you re-try this now? Pretty random issue, not sure why the legacy AST is generated at all (the regular ast doesn't have the import directives that cause the issue).