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
By doing so, the gas cost of creating parametrizable clones is reduced, since there's no need to store the parameters in storage, which you need to do with EIP-1167. The cost of using such clones is also reduced, since storage loads are replaced with calldata reading, which is far cheaper.
I don't think the gas savings should compare with storage loads since immutable data are not loaded from storage in the first place, it's loaded from code, so it should compare with that of codecopy, which will be more or less the same in both cases.
IMO the essential advantage this library provides is: it allows to parameterize the immutable data at the clone time instead of at deploy time of implementation contract in the case of EIP-1167.
The text was updated successfully, but these errors were encountered:
I don't think the gas savings should compare with storage loads since immutable data are not loaded from storage in the first place, it's loaded from code, so it should compare with that of codecopy, which will be more or less the same in both cases.
This is in comparison to a normal proxy clone
Remember that with clone, implementation code is all the same, so any immutable are also same and so not parametrizable.
As such with such normal clone you would have to parametrize by using storage for which you have to pay the initialisation storage cost and each storage read . With clones-with-immutable-args you do not need to write to storage as you can inject immutable in the proxy and pay only calldata for read
Maybe we could word it differently to make this clearer ?
I don't think the gas savings should compare with storage loads since immutable data are not loaded from storage in the first place, it's loaded from code, so it should compare with that of
codecopy
, which will be more or less the same in both cases.IMO the essential advantage this library provides is: it allows to parameterize the immutable data at the clone time instead of at deploy time of implementation contract in the case of
EIP-1167
.The text was updated successfully, but these errors were encountered: