Skip to content

Commit

Permalink
use safe smart account
Browse files Browse the repository at this point in the history
  • Loading branch information
mouseless0x committed Sep 2, 2024
1 parent 78225fe commit d8f5dc0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tutorial-2.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "dotenv/config";
import { createSmartAccountClient } from "permissionless";
import { toSimpleSmartAccount } from "permissionless/accounts";
import { toSafeSmartAccount } from "permissionless/accounts";
import { createPimlicoClient } from "permissionless/clients/pimlico";
import {
createPublicClient,
Expand Down Expand Up @@ -46,9 +46,10 @@ const pimlicoClient = createPimlicoClient({
},
});

const account = await toSimpleSmartAccount({
const account = await toSafeSmartAccount({
client: publicClient,
owner: privateKeyToAccount(privateKey),
owners: [privateKeyToAccount(privateKey)],
version: "1.4.1",
});

const smartAccountClient = createSmartAccountClient({
Expand Down

0 comments on commit d8f5dc0

Please sign in to comment.