Switch from web3.js to ethers.js
Update Code Examples from Using Web3.js to Ethers.js
Resolves: #15759
Thank you for your contribution to the Solidity compiler! A team member will follow up shortly.
If you haven't read our contributing guidelines and our review checklist before, please do it now, this makes the reviewing process and accepting your contribution smoother.
If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the #solidity-dev channel on Matrix.
Also, this is failing because there are trailing whitespaces that needed to be removed in lines
191and194
Fixed
@codersjj can you rebase and squash the commits, please?
@codersjj can you rebase and squash the commits, please?
Sure! I've rebased and squashed the commits. However, I noticed an extra merge commit was generated. Is this acceptable, or should I clean it up? Let me know! 😊
Sure! I've rebased and squashed the commits. However, I noticed an extra merge commit was generated. Is this acceptable, or should I clean it up? Let me know! 😊
Rebasing would have removed the merge commit. I think you must have merged develop on your branch instead of rebasing it on develop. Also, the commits with review fixes do not seem squashed.
Thanks for the contribution! The code looks good overall.
However, the PR does not seem to be addressing #15759 completely (despite the
Resolves: #15759in the description). There are a few more web3.js snippets in the docs and also some mentions of the library.I don't think it really makes sense to convert just one example and leave everything else as is. Having one in some places and the other in others might be even worse than just leaving it as is.
Thanks for pointing that out—I completely agree! 🙌 You're right that consistency is key here. I'll go through the docs to find any remaining web3.js snippets/mentions and update them to use ethers.js instead. Appreciate the thorough review, and please feel free to flag any other instances I might miss!