You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve been experimenting with clones with immutable args (check out the Solady LibClone library)
Why am I looking into this?
Right now, Excubiae lets you deploy your specific Checker with specific parameters (like a set of external addresses for verifiers - used to verify the attributes / criteria). Same for Policy contracts—you tie them to one Checker. But here’s the thing: If you want different parameters for different contracts, you have to redeploy everything from scratch every time. Basically, the current setup works but locks us into using the same config across multiple contracts (in reality, is one contract keeping a mapping of mapping to guarantee separate state for different contracts).
Proposed solution
This is a simple yet non invasive gas efficient solution: Clones with immutable args. Why this specific proxy/clone pattern?
Gas savings compared to storage variables.
No issues with storage collision like other proxies.
No need for heavy redeployments—it’s lightweight.
The biggest changes are:
We use a factory to deploy clones/proxies.
The implementation pulls immutable args instead of relying on storage. In order to do this, you need to go byte per byte in order to rescue vars, not so bad for the dev ex.
The text was updated successfully, but these errors were encountered:
I’ve been experimenting with clones with immutable args (check out the Solady LibClone library)
Why am I looking into this?
Right now, Excubiae lets you deploy your specific Checker with specific parameters (like a set of external addresses for verifiers - used to verify the attributes / criteria). Same for Policy contracts—you tie them to one Checker. But here’s the thing: If you want different parameters for different contracts, you have to redeploy everything from scratch every time. Basically, the current setup works but locks us into using the same config across multiple contracts (in reality, is one contract keeping a mapping of mapping to guarantee separate state for different contracts).
Proposed solution
This is a simple yet non invasive gas efficient solution: Clones with immutable args. Why this specific proxy/clone pattern?
The biggest changes are:
The text was updated successfully, but these errors were encountered: