Skip to content
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

Move solc from optional to dev dependency and update Slueth interface #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

torreyatcitty
Copy link

Users to wish to use solc will now need to pass in the solc.compile() function depending on how they use the API.

… to allow users to pass in solc.compile function.
}

query<T>(q: string): Query<T, []> {
let registrations = this.sources.map((source) => {
let iface = JSON.stringify(source.iface.format(FormatTypes.full));
let iface = JSON.stringify(source.iface.format(FormatTypes.full));
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this indent be here?

@@ -20,9 +23,8 @@
},
"dependencies": {
"@ethersproject/contracts": "^5.7.0",
"@ethersproject/providers": "^5.7.2"
"@ethersproject/providers": "^5.7.2",
"solc": "^0.8.21"
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels like it should be even less here?

throw new Error(`solc.js yarn dependency not found. Please build with optional dependencies included`);
function solcCompile(
input: SolcInput,
compileFn: ((input: string) => string) | undefined
Copy link
Contributor

Choose a reason for hiding this comment

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

I really think this should be async, which would be a way more common way to use it (e.g. via a WebWorker)

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