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
function initialize(ValidationId _rootValidator, IHook hook, bytescalldatavalidatorData, bytescalldatahookData)
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
The text was updated successfully, but these errors were encountered:
When a hook isn't wanted during the init of a Kernel, we still have to send an 0 address + empty array of bytes
kernel/src/Kernel.sol
Line 102 in b8442f2
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 L1The text was updated successfully, but these errors were encountered: