clones-with-immutable-args icon indicating copy to clipboard operation
clones-with-immutable-args copied to clipboard

Combine with cacheable beacon proxy to make it upgradable

Open BlinkyStitt opened this issue 3 years ago • 2 comments

Having upgradability and some immutables could be helpful for my current project. https://github.com/frangio/cacheable-beacon-proxy/blob/master/contracts/CacheableBeaconProxy.sol

BlinkyStitt avatar Mar 15 '22 03:03 BlinkyStitt

I've thought about it some more and I'm not sure how best to do this. Deploying the "cache" would be expensive since it clones the implementation and not the thin proxy. And I think multiple layers of delegatecall is probably not worth the gas cost.

BlinkyStitt avatar Mar 15 '22 06:03 BlinkyStitt

I think if we:

  1. change https://github.com/frangio/cacheable-beacon-proxy/blob/master/contracts/CacheableBeaconProxy.sol#L92 to deploy a simple delegatecall proxy
  2. change https://github.com/frangio/cacheable-beacon-proxy/blob/master/contracts/CacheableBeaconProxy.sol#L82 to include the extra data in the calldata

then it might work

BlinkyStitt avatar Mar 15 '22 06:03 BlinkyStitt