3

I'm looking for the cheapest way (in terms of gas price) to design upgradeable contracts. I don't expect many upgrades. Being inspired by Writing upgradable contracts in Solidity, I'm investigating the use of libraries for logic implementation for a contract (so separating storage from the logic). One obvious advantage is to only deploy once (or reuse already deployed) libraries and not contaminating the Blockchain with repetitive code.

Are there any runtime penalties (performance) of using libraries rather then contract inheritance?

The article mentioned above says:

With libraries, there is a slight gas overhead on each call. However, it makes deploying a new contract much cheaper.

But it doesn't clarify what is the overhead.
If the overhead still exists, are there any plans to eliminate it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.