1

I am developing an app that is using the etherscan-api package.

I use it to get the contract ABI.

The problem is that I retrieve it via the API every time the function is called.

My question is: Can a Contracts ABI change at any point and can I just store the ABI json in a database field to reduce processing time?

3

While there is a concept of 'contract upgradeability' that developers can build into their smart contract logic, smart contracts cannot update their contract ABI as a part of that process.

The exposed functions of a smart contract are immutable once the contract is created, and thus the contract ABI is also immutable.

0

Contract ABI should never change. You can safely use the ABI extracted from the deployment of your contract.

Also, to expand on what @shawn-tabrizi is talking about "contract upgradeability", if you plan to use. With "contract upgradeability", you separate logic and data into separate smart contracts. It essentially means, we use one contract to implement the logic and another contract to store the data.

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.