solidity icon indicating copy to clipboard operation
solidity copied to clipboard

Switch from web3.js to ethers.js

Open codersjj opened this issue 10 months ago • 6 comments

Update Code Examples from Using Web3.js to Ethers.js

Resolves: #15759

codersjj avatar Jan 23 '25 13:01 codersjj

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.

github-actions[bot] avatar Jan 23 '25 13:01 github-actions[bot]

Also, this is failing because there are trailing whitespaces that needed to be removed in lines 191 and 194

Fixed

codersjj avatar Jan 24 '25 15:01 codersjj

@codersjj can you rebase and squash the commits, please?

matheusaaguiar avatar Jan 31 '25 18:01 matheusaaguiar

@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! 😊

codersjj avatar Feb 01 '25 04:02 codersjj

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.

cameel avatar Feb 01 '25 17:02 cameel

Thanks for the contribution! The code looks good overall.

However, the PR does not seem to be addressing #15759 completely (despite the Resolves: #15759 in 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!

codersjj avatar Feb 03 '25 00:02 codersjj