openzeppelin-contracts
openzeppelin-contracts copied to clipboard
Distributing contracts on EthPM
Last version release was v1.3.0 to ETH PM. Is there a better package manager I should know about?
We haven't been able to publish to EthPM for a while because of this same weird error: https://github.com/trufflesuite/truffle/issues/699.
On hold until we update to Truffle 4.1.5 which fixes the error.
Sounds good. In the meantime I've been using NPM for those that are looking for an alternative.
We've updated Truffle but publishing to EthPM seems to still not work. I'm not even able to install the versions that are already published.
There's been an issue with installing until truffle 4.1.12: https://github.com/trufflesuite/truffle/issues/985 It got fixed in 4.1.12, now on 4.1.13 packages get installed properly. @frangio Maybe worth a try to publish again with the latest version of truffle?
Please, do! I currently can't find the folder ERC721 when installing the ethpm package, it looks like a very old version. I could copy/paste the source code from this repository though...
This should now be fixed in the develop branch of truffle: https://github.com/trufflesuite/truffle/pull/1227 (I don't know their release schedule so I'm not sure if it will go out with the next release)
If you are eager, you can always patch your node_modules/truffle/build/cli.bundled.js
manually... simply find and replace for the five name changes, https://github.com/trufflesuite/truffle/pull/1227/commits/57402c829aa9b1f4809c9df4419b25283072915b
I've tried this myself, but only the zeppelin EthPM team can publish to the registry since only they have their wallet secret keys.
Also, I did have issues with the IPFS gateways having some bandwidth or data cap. I was able to get the first part working using a local daemon.
We haven't published to EthPM for a while now - @frangio is this something we want to go back to?
AFAIK EthPM has undergone deep changes since we last published on it. Looking around online it's not clear to me if Truffle even supports the new version.
Maybe @gnidan can guide us a bit here?
Also looping in @njgheorghita from EthPM. Any pointers here will be greatly appreciated! 🙂
Hey @frangio! Yes, you're correct EthPM has updated to a new version (v2), which rather than hosting a central registry, each organization / developer / party is encouraged to deploy their own package registry to which they can publish their packages. In terms of the best tools to use to achieve this goal, I'm afraid I can only speak about the tooling available in the Python world.
If you're interested in using Truffle and EthPM @gnidan is in charge of that effort and the JS tooling. If you'd like pointers on the Python tooling available for EthPM, just ping me again and I'm happy to help guide you in the right direction. However, if your users are interacting with EthPM via Truffle, then I'm afraid that the Python tooling might not be that useful for that specific use case.
+1. AFAIK there isn't a clean way to import scripts when using combined with yarn PnP (?). In this case, it would be super if we could just use EthPM to pull things in.
Workaround in the meantime is to copy local (ick).
@FrozenKiwi Can you clarify if you're referring to EthPM v2, and what specific tooling you would use to pull the package in that case?
I think we should delete the current ehpm.json
manifest from our repo because if I understand correctly it's out of date with the newer spec, and then work on having something for the newer EthPM.
@FrozenKiwi could you expand a bit on the issues when using yarn PnP, and how EthPM addresses those?
Yarn PnP doesn't extract packages to the node_modules
directory, but serves them directly from the .tgz
sort of at runtime. Tools need to be changed to support this, for example Truffle and the OpenZeppelin CLI would need to know to look for contracts in the PnP "repository" rather than in node_modules
.
EthPM would also not put contracts in node_modules
, though, so unless the tooling already supports that the situation is not so different. Implementing support for EthPM in tools sounds easier and less controversial, though.
I don't know, I just installed the latest truffle and used "truffle install". It was a short-lived experiment, turns out Yarn PnP doesn't play nicely with electron either so I've already abandoned that effort.
^^ What @frangio said, except EthPM (when run from truffle) puts the contracts in a local folder that you can then directly import. This way you keep your external files under management, if not exactly under node_modules.
Hey! Just wanted to chime in here. Truffle currently supports EthPM v1 (which I believe is broken). Support for EthPM v2 is coming with the next major version bump to v6. However, the spec for EthPM v3 is currently under development - and close to being finalized (i.e all v2 tooling will need some updating in the near future). v3 brings some minor but useful spec changes allowing the solidity compiler to natively support the spec in its outputs.
We're hosting a discussion/informational session about v3 - with a goal to finalize the v3 spec - at the Solidity Summit next week. If you have any questions / ideas or just want to listen in, it'd be great to see you there!
Thanks for the update. Will definitely be there!
EthPM explorer is down and I couldn't any recent relevant activity. Also, Truffle is being sunset and most of the discussion is for using EthPM in Truffle.
Closing