Skip to content

Kernel code review #1 #1

@derekchiang

Description

@derekchiang
  • Reference to "threshold" is outdated

https://github.com/zerodevapp/zerodev-wallet-kernel/blob/acbc843ffbafa2eaf11bc6e93ed5e5d0438a24bd/src/Kernel.sol#L17

  • I know the new entrypoint is not released yet, but would we want to validate & increment nonce here if it was sent directly by the owner?

https://github.com/zerodevapp/zerodev-wallet-kernel/blob/acbc843ffbafa2eaf11bc6e93ed5e5d0438a24bd/src/Kernel.sol#L66

As I typed out this comment, I realize that that would require us to pass in a nonce in this function, which is annoying.

  • I wonder if it makes sense to check two signatures, once with toEthSignedMessageHash and one without. The reason is that some signers use the \x19Ethereum Signed Message:\n prefix and some don't, and we want to work with both kinds of signers. Does that make sense?

https://github.com/zerodevapp/zerodev-wallet-kernel/blob/acbc843ffbafa2eaf11bc6e93ed5e5d0438a24bd/src/Kernel.sol#L137

https://github.com/zerodevapp/zerodev-wallet-kernel/blob/acbc843ffbafa2eaf11bc6e93ed5e5d0438a24bd/src/Kernel.sol#L180

  • Right now the AccountFactory is tied to MinimalAccount. Would it make sense to create an abstract contract with the initialize method, and have the AccountFactory tie to that instead? That way we can use the AccountFactory with the PluginAccount too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions