DEV Community


Posted on

Libraries in Solidity.

When you need to share code between Solidity Contracts, it's time to utilize Libraries.

Libraries are a great place to store functions that are common to many Smart Contracts. These functions can range from re-usable math functions to contract patterns and permissions.

Using libraries can:

Reduce new code, limiting the opportunity for bugs.

Save development time by not re-inventing the wheel.

Secure your contracts with audited code and best practices.

*Save gas on deployments by making use of already deployed code.

*Saving gas depends on how you use the library. Libraries can be deployed on their own, like contracts, and they can also be compiled into the contract bytecode directly.

Latest comments (0)