Solidity – How to Handle Callable Functions Not in ABI or Source Code During Contract Development

abicontract-developmentcontract-invocationetherscanfantom

I've found several contracts for which I am able to call functions on the contract's front-end but that exist in neither the contract source code nor ABI.

When I call the functions, ftmscan (an analog of etherscan) shows the function name, but when I go the contract page to view the source code and ABI, no trace of the function can be found.

How is this possible?

If I manually modify the ABI to include the function, would I be able to call the function without using the front-end, using, for e.g. the web3 python package?

Best Answer

We could help better if you included more details such as contract addresses. But in your case it seems like that contract is a Proxy Contract, this is why you don't see the implementation nor the corresponding ABI.

And yes, you can manually add the method you are calling to the ABI and use with web3 libraries. Or, you can also use encodeFunctionSignature