2

I'd like to know how to create https://github.com/ethereum/go-ethereum/blob/master/internal/jsre/deps/web3.js file automatically. It seems like bundled by some tools but I cannot find any mention or docs in the geth repo. Is there anyone who knows how to create bundled web3.js automatically embeded in geth? Thanks in advance for all your answers 🙂

FYI.

  • I already knows how web3 works and I used it several times because Im a developer.
  • Just wanna know how they bundled that web3 library and maintain that bundled file. (e.g. bundle web3 library using gulp, etc...)
7
  • 1
    It is just a minified version of web3 v0.20.1. I think the hardest thing to upgrade it is generating a version that can run inside goja the javascript interpreter used by go-ethereum.
    – Ismael
    Commented Dec 11, 2021 at 4:32
  • @Ismael Thanks for your comment. But how to create that minified version of that version of web3? What tool would they use..? Commented Dec 11, 2021 at 12:33
  • 1
    Check the repo at that version github.com/ChainSafe/web3.js/blob/0.20.7 it has a command to build the minified file.
    – Ismael
    Commented Dec 11, 2021 at 16:02
  • @Ismael Thanks for your detailed comment. It was really helpful. One more thing. How did you know that Geth use specified version v0.20.1? (Updated.) I knew that.. there is a specified version in the web3.js :) Commented Dec 13, 2021 at 1:25
  • 1
    I'd check if there's a branch for the exact version v0.20.1, I'd also check the npm dependencies. I don't know if at that time web3 builds were reproducible.
    – Ismael
    Commented Dec 13, 2021 at 3:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.