Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish metadata of contracts while publishing package #801

Open
abhayks1 opened this issue Dec 9, 2019 · 2 comments
Open

Publish metadata of contracts while publishing package #801

abhayks1 opened this issue Dec 9, 2019 · 2 comments
Assignees

Comments

@abhayks1
Copy link
Contributor

abhayks1 commented Dec 9, 2019

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",

Problem
Contracts are being compiled on different compiler version

Proposed Solution
Publish metadata of contracts when publishing package

@abhayks1 abhayks1 self-assigned this Dec 9, 2019
@abhayks1 abhayks1 changed the title npm run compile should use local truffle npm version for contracts compilation npm run compile should use node modules truffle npm version for contracts compilation Dec 9, 2019
@pgev
Copy link
Contributor

pgev commented Dec 9, 2019

@abhayks1 as far as I know npm run always uses the binaries first from 'node_modules/.bin', hence we do not explicitly do what is proposed in ticket.

@abhayks1
Copy link
Contributor Author

abhayks1 commented Dec 9, 2019

@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 abhayks1 changed the title npm run compile should use node modules truffle npm version for contracts compilation Package publish is compiling contracts at wrong compiler version Dec 9, 2019
@abhayks1 abhayks1 changed the title Package publish is compiling contracts at wrong compiler version Publish metadata of contracts while publishing package Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants