I don’t know if this is the right place to ask my question.
I’m retrieving all newly deployed contracts on Uniswap V2 & V3, and I’ve encountered a problem related to differences between contract versions. I’m providing a standard ABI like below :
function name() public view returns (string memory)
However, some contracts have this signature:
function name() public pure returns (string memory)
Due to the presence of “pure”, I can’t call it using the standard ABI. I’m currently using the ethers library with Infura. What’s my best approach to retrieve the ABI and make calls that are compatible with all contracts?
I want to be able to call any name function if exist no matter the signature.