Skip to content

Add hardhat #6

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

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

Add hardhat #6

wants to merge 19 commits into from

Conversation

turbocrime
Copy link
Owner

add hardhat, and a basic consuming fixture.

esm mode because i'm insane.

cc @julien51

haven't set up publishing yet, try it out with pnpm pack.

@turbocrime
Copy link
Owner Author

turbocrime commented Feb 7, 2025

todo:

  • test package consumption
  • configure package for publication
  • publish workflow

@julien51
Copy link

julien51 commented Feb 9, 2025

esm mode because i'm insane.

:D

Comment on lines +12 to +25
subtask(TASK_COMPILE_SOLIDITY).setAction(async (_, { config }, runSuper) => {
const superRes = await runSuper();

try {
await writeFile(
join(config.paths.artifacts, "package.json"),
'{ "type": "commonjs" }',
);
} catch (error) {
console.error("Error writing package.json: ", error);
}

return superRes;
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably a nit but I would move that to a tasks folder

@@ -0,0 +1,37 @@
{
"name": "solidity-cbor",
"private": true,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will likely need to go away when you're ready to publish?

Copy link

@julien51 julien51 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@turbocrime
Copy link
Owner Author

i think i'm going to convert this repository to a workspace, with hardhat tools at the root only, so the hardhat/foundry dual config is less awkward and special-cased.

@turbocrime
Copy link
Owner Author

also concerned that esm config creates problems for consumption. workspacing it should allow that to be tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants