Skip to content

SmartAccount #13

Description

@mpetrunic

We should abstract creating userOps for the user. I'm proposing we implement following class

class SmartContractAccount {

   address: string;

   constructor(entrypointAddress: string, signer: IProviderAndSigner, initCode?: string);

   setPaymaster(paymaster: IPaymaster);

   //sends empty userOperation to force account creation
   deploy(overrides: {...gasPricesAndLimits}) : Promise<>;
 
   //creates and signs transfer UserOperation
   createTransfer(transferDetails): UserOperation;

   sendTransfer(transferDetails): Promise<HexString32Bytes>;

   createContractCall(contract: Contract, method: string, arguments: unknown[], fee: string): UserOperation;

   send(userOp: UserOperation): Promise<HexString32Bytes>;

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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