-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor OwnableExecutor module & fixed tests #580
Conversation
size-limit report 📦
|
// buildUseropDto | ||
) | ||
} | ||
// async sendTransactionWithExecutor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments
accountAddress?: Address | ||
): Promise<UserOpReceipt> { | ||
senderSmartAccount?: NexusSmartAccount | ||
): Promise<Partial<UserOperationStruct>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was thinking about this after you mentioned it yesterday. Taking inspiration and being consistent with the other decorators that deal with sending user ops here. see clients/decorators/installModule
, clients/decorators/uninstallFallback
etc. They allow you to pass in options for sending the userop (gas estimates etc), and return the user op hash.
@@ -193,4 +185,15 @@ export class OwnableExecutorModule extends BaseExecutionModule { | |||
|
|||
return owners as Address[] | |||
} | |||
|
|||
public async isModuleInitialized(smartAccount?: Address): Promise<any> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like another useful decorator
@@ -198,7 +252,7 @@ export const toConfiguredAnvil = async ({ | |||
rpcPort | |||
}: { rpcPort: number }): Promise<AnvilInstance> => { | |||
const instance = anvil({ | |||
hardfork: "Paris", | |||
hardfork: "Cancun", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sry wrong pr
PR-Codex overview
This PR updates code related to smart account deployment and testing utilities.
Detailed summary
publicClient.getBytecode
topublicClient.getCode
in multiple files.type NexusSmartAccount
andtype UserOperationStruct
.BaseExecutionModule
method signature.createSmartAccountClient
withgetTestSmartAccount
in test files.BaseSmartContractAccount
implementation.getTestSmartAccount
function for testing smart accounts.hardfork
value from "Paris" to "Cancun".testClient.getBytecode
withtestClient.getCode
in test files.byteCodeDeployer
function to usepublicClient.getCode
.createOwnableExecutorModule
function and related changes in test files.