Closed dnlchong closed 1 year ago
encodeCall fails when using a function selector of an overloaded function.
encodeCall
Attempt to compile the following code. The error occurs because safeTransferFrom is an overloaded function.
import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; // OpenZeppelin v4.6.0 (bool transferSuccess, bytes memory transferResult) = address(_erc721Address).call( abi.encodeCall(IERC721(_erc721Address).safeTransferFrom, (_ownerAddress, vaultAddress, _erc721Id)) ); // Error: Member "safeTransferFrom" not unique after argument-dependent lookup in contract IERC721
I've looked around but could not find this issue mentioned in the repo. I can start working on a PR if the issue looks valid.
related https://github.com/ethereum/solidity/issues/13813 ?
Description
encodeCall
fails when using a function selector of an overloaded function.Environment
Steps to Reproduce
Attempt to compile the following code. The error occurs because safeTransferFrom is an overloaded function.
I've looked around but could not find this issue mentioned in the repo. I can start working on a PR if the issue looks valid.