0

In the constructor of this Solidity contract, the second argument is the address of the WETH contract.

But in the repository there is no contract named WETH.sol which I can deploy and pass its address as the argument. Where is this WETH contract?

In the "interfaces" folder of the repo there is IWETH.sol which has three functions in it which I think need to be implemented. Do I need to implement WETH on my own which provides the functionality for those functions declared in IWETH.sol?

1
  • @Rob Hitchens can you please take a look at this? May 27 at 11:36
2

You can always get the contract code from the Ethereum blockchain for any ERC20 token by using etherscan.io. Just pass the contract address. For WETH, the Mainnet contract address is 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2. To see the contract, go to https://etherscan.io/address/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2#code.

1
  • This is correct, but note that the said WETH contract is WETH9. There is another version of WETH called WETH10. Aug 30 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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