In the constructor of the Solidity contract given in the link below https://github.com/pancakeswap/pancake-swap-periphery/blob/master/contracts/PancakeRouter.sol receives a second arg which is address of 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?

  • @Rob Hitchens can you please take a look at this? – Azeem Lodhi May 27 at 11:36

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.

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.