Having another initialize method without this data could save up a bit of gas on L2, since less calldata sent (and this data is required to be sent during the contract creation, on arbitrum, it's approx 24k ArbGas that could be saved), smth like that:
function initialize(ValidationId _rootValidator, bytes calldata _validatorData) external {
// ... Same as before
// Hook setup would be:
ValidationConfig memory config = ValidationConfig({nonce: uint32(1), hook: address(0) });
_installValidationWithoutNonceIncremental(_rootValidator, config, _validatorData, 0x);
}
Ooh and btw, the ValidationConfig fit on 32 bytes, so similarly to the custom ValidationId or ExecMode, type ValidationConfig could be a custom type on top of bytes32, saving up a bit on computation cost on L1 / alt L1
When a hook isn't wanted during the init of a Kernel, we still have to send an 0 address + empty array of bytes https://github.com/zerodevapp/kernel/blob/b8442f2b138b7832b2353b564bcdebb269446a46/src/Kernel.sol#L102
Having another
initialize
method without this data could save up a bit of gas on L2, since less calldata sent (and this data is required to be sent during the contract creation, on arbitrum, it's approx 24k ArbGas that could be saved), smth like that:Ooh and btw, the
ValidationConfig
fit on 32 bytes, so similarly to the customValidationId
orExecMode
, type ValidationConfig could be a custom type on top of bytes32, saving up a bit on computation cost on L1 / alt L1