v4-core
v4-core copied to clipboard
Calldata over memory
Component
No response
Describe the suggested feature and problem it solves.
A number of the parameters used in core are passed in using memory, but are never written to only read, so we should try to move them to calldata and see if it saves gas. This includes the unlockCallback should be parsing in calldata not memory to save it being passed back and forth between the 2
I spent a few mins doing a first pass on calldata-not-memory
but things are failing and this isnt my priority right now
Describe the desired implementation.
No response
Describe alternatives.
No response
Additional context.
No response
On an initial attempt with making the PoolKey
calldata
instead of memory
, the gas only seems to be increasing. The addLiquidity
snap goes up by 2000.
Closing this as it seems to cause gas to increase.