OpenST / mosaic-contracts

Mosaic-0: Gateways and anchors on top of Ethereum to scale DApps
https://discuss.openst.org/c/mosaic
MIT License
114 stars 31 forks source link

`npm run compile` should use node modules truffle version for contracts compilation #802

Closed abhayks1 closed 4 years ago

abhayks1 commented 4 years ago

Problem For compilation of contracts, publisher global truffle version is used. This is a problem since truffle global version can be different everytime mosaic contracts npm is published.

"compile": "truffle compile",

Solution Use node modules truffle version for contracts compilation

"compile": "./node_modules/.bin/truffle compile",

Fixes #801

abhayks1 commented 4 years ago

Adding the same comment which I added in ticket

@pgev Thank you for the comment. I did a quick test and it seems you are right.

Strangely contracts on etherscan are being verified on different solc versions(other than 0.5.0). Please see the report for contracts verification. https://github.com/mosaicdao/mosaic-pm/blob/master/specification-discussions/20191206-etherscan-verification.md#chain-contracts-verification This triggered that when publishing package, somehow compilation was done on different solc versions.

Any idea how could that happen?

abhayks1 commented 4 years ago

Closing the PR as description of ticket has changed.