solady icon indicating copy to clipboard operation
solady copied to clipboard

✨ ERC1967Factory for beacon proxies

Open meetmangukiya opened this issue 2 years ago • 10 comments

meetmangukiya avatar Aug 06 '23 02:08 meetmangukiya

Unfortunately, this is not on the roadmap.

I'll recommend OpenZeppelin if you need the Beacon proxy.

If you really need a max optimized Beacon proxy, let me know.

Vectorized avatar Aug 06 '23 13:08 Vectorized

@Vectorized Can you share the roadmap with me? I have some free time.

atarpara avatar Aug 06 '23 13:08 atarpara

I see. Yeah, had to use OZ as dependency just for beacon proxies would be nice if it gets in solady too.

meetmangukiya avatar Aug 06 '23 13:08 meetmangukiya

If you are ok with no Etherscan support (i.e. no read and write to proxy tabs), you can implement it as a ERC1167 minimal proxy -> ERC1967Proxy.

More efficient for small calldata sizes, as it avoids an extra SLOAD.

But I feel Etherscan support is more important if your product is aimed towards mass market.

Anyway, if you are going with Beacon pattern, it means max gas savings isn't the highest priority, so OpenZeppelin is probably ok.

Vectorized avatar Aug 06 '23 19:08 Vectorized

Due to circumstances (some imperfections found in V1 during the audit), we are considering the possibility of a V2 with beacon capabilities.

But this won’t be an easy task. Two new bytecode contracts (beacon, beaconProxy) must be written. It’s gonna be really insane.

At this point, this factory is more of making an artistic statement. If funds can be provided to cover the development and audit, we can make this closer to reality.

Vectorized avatar Aug 15 '23 05:08 Vectorized

@Vectorized can you elaborate more on what you mean by the factory being an artistic statement? Because I would like to use it in production soon. 😅

waynehoover avatar Aug 23 '23 00:08 waynehoover

@waynehoover I think right now I don’t have brain juice for making the V2 factory. 😂 Estimated effort is 2 weeks (not including time to mine the address). And I gotta nerdsnipe others to look into it for safety.

Even though I really want to make it for the joy of it. 🥹

Vectorized avatar Aug 23 '23 21:08 Vectorized

Thanks, I was talking about the current factory though, that's been audited and good to use in production, correct?

waynehoover avatar Aug 23 '23 22:08 waynehoover

I think it is under audit process by spearbit. @Vectorized correct me if am i wrong.

atarpara avatar Aug 24 '23 04:08 atarpara

@waynehoover @Atarpara Yes, currently under audit. Finishing soon, tentatively by Aug 25th.

So far no vulnerabilities. :)

Vectorized avatar Aug 24 '23 23:08 Vectorized