Skip to content

SmartAccount #13

@mpetrunic

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>;

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions