Best practice for sharing truffle projects #5028
Unanswered
broadbear
asked this question in
General Q&A
Replies: 1 comment
-
I'm falling back on creating a separate migration script for the exchange contract in the crowdsale project and run the migration with 'f' and 'to' parameters. My primary concern with this is if someone runs the migration with the wrong or no parameters it could really throw a wrench into a project. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What's a best practice for sharing truffle projects?
I have packaged one truffle project as an npm package, and this is working fine with some manual intervention. I have to update package.json to include the generated abis. However, when I install the npm package in another truffle project, although the .sol files in the npm package are properly discovered, new abis are generated and deployed networks are not preserved, so I have to copy the abi from the npm package with the populated networks into the build/contracts directory.
I think this would be a really common occurrence, for instance, when a new token might be in one truffle project, and other projects that depend on the token, such as icos, crowdsales, and exchanges, would be in another truffle project. It doesn't seem practical to redeploy a live token contract just because you have created another project that depends on that token.
In my case I developed the token contract and crowdsale contract in the same truffle project. They have been deployed to test and mainnet. I am now working on an exchange for the token, but I don't want to put the new exchange contract in the same project as the token because I want to deploy the exchange independently of the token.
Thanks,
Mike
Beta Was this translation helpful? Give feedback.
All reactions