-
Notifications
You must be signed in to change notification settings - Fork 18
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
Remove prepare dependencies script #143
Conversation
Build artifacts are stored inside the build/ dir, not the artifacts/ dir. Ignoring artifacts/ dir prevents from unignoring @keep-network/keep-core/artifact. Ignoring artifacts under external/npm with the exception of @keep-network/ dir
This script a lot of times errored out with the $INIT_CWD issue. It happens randomly, but brings a lot of headache for the developers. Instead of fixing the issue with dependencies and diving into yarn that might be a rabbit hole we can hardcode a couple of artifacts that were already deployed. Most of the projects that have the solidity-contracts as dependency do not use any artifacts from external/npm/@keep-network/keep-core dir.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also modify this comment:
solidity-contracts/hardhat.config.ts
Lines 99 to 102 in f468a7d
// Due to a limitation of `hardhat-deploy` plugin, we have | |
// to modify the artifacts imported from NPM. Please see | |
// `scripts/prepare-dependencies.sh` for details. | |
artifacts: "external/npm/@keep-network/keep-core/artifacts", |
We hardcode external goerli addresses from version @keep-network/[email protected] and get rid of other unused artifacts. This change is done because prepare-dependencies.sh script was removed.
hardhat.config.ts
Outdated
// ropsten network in no longer supported and should not be used | ||
ropsten: [""], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So maybe remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I considered this myself but opted to just add a comment since there will be way more work around cleaning unused networks, and ropsten
is a part of it. Anyway, removed it here fc2f177
What I meant by being prepared for supporting sepolia was creating a file structure in the |
After the PR gets merged, it will be good to see if there's anything that can be changed in the workflows we use in projects using |
Background: Previously we've been running postinstall script in a separate step from the `yarn install` command. We've been doing that as a workaround for a problem we had with the postinstall script in the `@threshold-network/solidity-contracts` package (the script in that package often randomly failed). Running `yarn upgrade` with `--ignore-scripts` flag prevented the execution of postinstall script in the main project and its depandencies. And running `yarn run postinstall` after did execute the postinstall script in the main project. The change: Recently we have refactored the `@threshold-network/solidity-contracts` project and got rid of the problematic script. We can go back to executing `yarn install` without the `--ignore-scripts` flag. Ref: threshold-network/solidity-contracts#142 threshold-network/solidity-contracts#143 threshold-network/token-dashboard#531
@dimpar, changes to typescript dependencies will be delivered in keep-network/tbtc-v2#636.
This indeed was better. We still got a significant diff, but this time it was justifiable. Most of the diff is a result of getting rid of the |
We have published new `@keep-network/ecdsa` and `@keep-network/tbtc-v2` packages. Those packages no longer include the `prepare-dependencies.sh` script from `@threshold-network/solidity-contracts` which was causing random failures during `yarn install`. As in some CI jobs we install the dependencies based on the lockfile (with the `--frozen-lockfile` flag), we need to update dependencies in the lockfile so that the new, improved packages would be used. Ref: threshold-network/solidity-contracts#142 threshold-network/solidity-contracts#143 #631
Refs #142
This PR removes
prepare-dependencies.sh
script that randomly errors out and gives a lot of headaches to developers. The script was added to mitigate the issue with the same naming ofTokenStaking.sol
contracts that are inkeep-core
andsolidity-contracts
repos. In some projects, both repos were added as dependencies and hardhat had a hard time differentiating the contracts during deployment. Since v1 contracts are already deployed and won't be changed, we can now hardcode the artifacts and get rid of the troubledprepare-dependencies.sh
script and related code.The following repos were checked for any potential issues as a consequence of removing this script. I didn't find any.
Depends on #144