-
Notifications
You must be signed in to change notification settings - Fork 479
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
Update documentation #658
Update documentation #658
Conversation
></script> | ||
``` | ||
|
||
(Alternatively use `https://binaries.soliditylang.org/bin/soljson-latest.js` to get the latests version.) | ||
This will load `solc` into the global variable `window.Module`. |
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.
Into the global variable or is that a namespace / object? Maybe saying assigning it as a member of window.Module
would be more precise?
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 global variable
is correct. I mean, the Module
is a property of window and thus a global variable since window is a global object of a web page that refers to itself. I may be wrong, but solc is not assigned as a member of the window.Module
, it is loaded as the Module object in the window. Maybe global object
would be correct, too. Like:
This will load solc as the global object window.Module.
But honestly, I'm not sure about the terminology. I usually refer to any window property as global variables, but I may be calling them by the wrong name, haha
README.md
Outdated
} | ||
}); | ||
``` | ||
|
||
The version **must** be in the long format string. | ||
Thus, if you would like to use version `v0.8.17` you need to provide it, including the committed version of the release. | ||
You can extract the long version string for each version from the [public available release list](https://binaries.soliditylang.org/bin/list.json). |
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 wanted to say that we should rather point people towards the new emscripten-wasm32/
and emscripten-asmjs/
dirs but I realized that it would be inconsistent because we're still using and mentioning bin/
everywhere. So I guess it's out of scope of this PR. FYI I created an issue for it: #671.
Needs rebase for the hardhat job to pass. It's already fixed on |
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.
LGTM.
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.
LGTM. Please remember to squash review fixes into the original commits before merging.
ca6ff29
to
4769b63
Compare
- Document the necessity of using long version string in loadRemoteVersion - Add note about low-level functions - Fix SRI documentation - Improve text Co-authored-by: Christian Parpart <[email protected]> Co-authored-by: matheusaaguiar <[email protected]> Co-authored-by: Kamil Śliwak <[email protected]>
Co-authored-by: matheusaaguiar <[email protected]> Co-authored-by: Kamil Śliwak <[email protected]>
The PR fixes the below issues adding documentation about their respective topics:
loadRemoteVersion
: Better document loadRemoteVersion #583solc.lowlevel.compileCallback
null
on solc 0.8.12? #610TypeError: Error resolving module specifier “solc/wrapper”
when trying to import solc-js in a browser #627