The following code seems to revert and I'm not sure why, does anyone spot anything off?
(bool allowance, bytes memory returnData) = weth.staticcall(abi.encodeWithSignature("allowance(address, address)", msg.sender, 0xFd495eeEd737b002Ea62Cf0534e7707a9656ba19)); require(allowance, "allowance query did not work");
I'm guessing it's cause WETH9 doesn't actually adhere to the ERC20 standard, in this case
allowances is a public
mapping(address => mapping (address => uint)). It doesn't implement a public view
allowance function. If I'm right about what the problem is, how do I query allowances with a lowlevel staticcall?
Edit: After reading the docs on generated getters I don't think that's the issue either. Maybe the problem is I'm making a staticcall to a contract compiled with solidity v0.4.18? Should I just do a regular call?