Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

feat: Add session key module validator #16

Merged
merged 15 commits into from
Dec 17, 2024
Merged

feat: Add session key module validator #16

merged 15 commits into from
Dec 17, 2024

Conversation

coffeexcoin
Copy link

No description provided.

@coffeexcoin coffeexcoin requested a review from cygaar December 13, 2024 17:39
@coffeexcoin coffeexcoin changed the title [WIP] Add session key module validator feat: Add session key module validator Dec 13, 2024
Copy link

@cygaar cygaar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i assume a lot of this code has been ripped from zksync - it overall looks good to me, but i dont have time to do an in-depth review

* @param smartAccount The smart account to check
* @return true if validator is registered for the account, false otherwise
*/
function isInited(address smartAccount) external view returns (bool) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be isInitialized?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clave modules use a custom IInitable that uses this method

// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.17;

interface IInitable {
    event Inited(address indexed account);
    event Disabled(address indexed account);

    function init(bytes calldata initData) external;

    function disable() external;

    function isInited(address account) external view returns (bool);
}

@@ -89,6 +89,9 @@ const config: HardhatUserConfig = {
},
solidity: {
version: '0.8.26',
settings: {
evmVersion: 'cancun',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed most of our contracts use ^0.8.24, do we want to bump those versions to 0.8.26 to match our compiler version?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might clean this up in a separate PR. I am going to lock zksolc to 1.5.6 right now to prevent any sort of verification issues.

@coffeexcoin coffeexcoin merged commit a34c603 into main Dec 17, 2024
1 check passed
@coffeexcoin coffeexcoin deleted the session-key branch December 17, 2024 01:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants