I have a localhost Hardhat Network running but I need to convert Fake ETH on it into WETH. How can I do this?

enter image description here

1 Answer 1


I think the easiest way to do this is to create an ERC20 called WETH. Something like:

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.4;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract WETHToken is ERC20 {
    constructor() ERC20("Wrapped ETHER", "WETH") {
        _mint(<msg.sender or your address>, 9999 ether);

So when you npx hardhat node, you'll have to deploy that contract.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.