Open Anupamskd7 opened 5 years ago
@Anupamskd7 The error as you can see is 'caused by the new compiler version. So, If you want to run it then maybe try with the older compiler.
Right now I do not have the capacity to update this project and if you find a way to make things works then just do a pull request and I'll try to take a look at it and merge it.
you can change "constant" with "pure" in the .sol files
I had a similar problem. Setting the version of your compiler to older version wouldn't be suggested as upcoming Truffle dependencies will yield same issues. Check out this for solving your issue for the moment.
@Anupamskd7 the code has been modified for 0.5v. You can now take a pull of the latest changes.
root@anupam-VirtualBox:/home/anupam/supply-chain# truffle compile pure Compiling your contracts...
Error: CompileError: Error parsing /home/anupam/supply-chain/contracts/OrderRegistry.sol: ParsedContract.sol:77:53: ParserError: The state mutability modifier "constant" was removed in version 0.5.0. Use "view" or "pure" instead. function getReport(string orderno, uint category) constant returns(string) { ^------^ Compilation failed. See above. at async.whilst.error (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-compile/profiler.js:366:1) at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-compile//async/dist/async.js:969:1 at next (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-compile//async/dist/async.js:5222:1) at Promise.all.then.results (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-compile/profiler.js:348:1) at Truffle v5.0.9 (core: 5.0.9) Node v8.10.0 root@anupam-VirtualBox:/home/anupam/supply-chain#