-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
add skeleton EDR Solidity Testing integration #5780
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
hardhatTotal size of the bundle: List of dependencies (sorted by size)
|
a9a1c5b
to
a71acb7
Compare
a71acb7
to
601bbb7
Compare
This is a hack to leverage the old Hardhat build system from the Hardhat cli to help with development while the new build system is put in place.
This is based on the `@ignored/edr` version that comes from the Solidity Test branch of EDR. We create a skeleton `solidity-test` plugin, that leverages the artifacts manager to find contracts and test contracts and pass them off to the EDR Solidity Test Runner before displaying the results.
601bbb7
to
6f036ff
Compare
v-next/hardhat/src/internal/builtin-plugins/artifacts/artifacts-manager.ts
Show resolved
Hide resolved
v-next/hardhat/src/internal/builtin-plugins/solidity-test/task-action.ts
Show resolved
Hide resolved
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.
I think it'd make sense to merge the skeleton and then iterate on the test runner + replace "v2" placeholders in the future. Before we do that though, I think we should add some inline comments to the files/functions which would make it clear which parts are up for all-out refactor, which are expected to be removed, etc.
Testing
I checked out this branch and successfully run hardhat test:solidity
✅ I quite like test:solidity
as a name, btw.
v-next/hardhat/src/internal/builtin-plugins/artifacts/artifacts-manager.ts
Show resolved
Hide resolved
v-next/hardhat/src/internal/builtin-plugins/artifacts/artifacts-manager.ts
Show resolved
Hide resolved
v-next/hardhat/src/internal/builtin-plugins/artifacts/artifacts-manager.ts
Outdated
Show resolved
Hide resolved
v-next/hardhat/src/internal/builtin-plugins/artifacts/artifacts-manager.ts
Show resolved
Hide resolved
language: "Solidity", | ||
sources, | ||
settings, | ||
settings: settings ?? {}, |
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.
Is there anywhere where we could encounter null-ish settings? Should we check an invariant instead maybe?
v-next/hardhat/src/internal/builtin-plugins/solidity-test/task-action.ts
Show resolved
Hide resolved
@galargh I think I caught all of comments. |
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.
Thank you 🙇
Add a skeleton Solidity Test built-in plugin using
@ignored/edr
with its Solidity Test Runner, to add anpx hardhat test:solidity
task.This PR comes in two commits:
compile
task based on old build system and extend ArtifactsManager to read from artifacts directoryRunning locally