what function in a smart contract is responsible for this?
In the documentation of Uniswap I've found only one reference to what I might be looking -- https://docs.uniswap.org/contracts/universal-router/technical-reference#wrap_eth
However, how to used and implement this in ethers or web3.js?