Say I have a hex string c4ef705a8a8f2db126b92013b4938230df2158b5
how can I format it as a solidity address using ethers js or another npm package to prepend 0x
and correctly capitalise some of the alphabetical hex characters like so: 0xc4ef705a8a8F2Db126B92013B4938230DF2158b5
1 Answer
After a small investigation the ethers.utils.getAddress function formats the address as desired.