Are there any OpenZeppelin libraries deployed publically?

I’m working on deploying a tested contract to MainNet. The embedded OpenZeppelin contracts are around 20kB, so I intend to deploy pieces of it as libraries.

However, I wondered if there already exists verified/scanned/versioned OZ libraries deployed the same way, which would drastically cut down on the cost and maintenance to basically do the same thing for myself and possibly pollute the chain.

Is there a directory of contract addresses containing any OZ code such as SafeMath, etc.?

Thanks in advance!

2 Likes

bump
anyone knows the answer?

All OZ library use internal function (not public). The means that they are not deployed as separate pieces of code that you would reuse, but rather that the code they provide is included directly in the contract that use them. These internal calls are cheaper to use than external ones (to a shared library).

If you are facing size limits, you should start by checking that optimizations are turned on. If that is not enough, we would definitelly love to hear more about your usecase. The next solution (after opimizations) is to use a "vtable proxy". This is not nativelly supported by OZ yet, but part of the migration to namespaces in 5.0 was so that we could enable this.

2 Likes