Skip to content

Commit e93a434

Browse files
resolve review comments
1 parent dbe1e8f commit e93a434

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

delegation-toolkit/get-started/quickstart.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_label: Quickstart
66

77
# MetaMask Smart Accounts quickstart
88

9-
This page demonstrates how to get started quickly with the MetaMask Smart Accounts, and send the first user operation.
9+
This page demonstrates how to get started quickly with MetaMask Smart Accounts, and send the first user operation.
1010

1111
## Prerequisites
1212

@@ -19,47 +19,47 @@ This page demonstrates how to get started quickly with the MetaMask Smart Accoun
1919
Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function. This client will let the smart account query the signer's account state and interact with blockchain network.
2020

2121
```typescript
22-
import { createPublicClient, http } from 'viem'
23-
import { sepolia as chain } from 'viem/chains'
22+
import { createPublicClient, http } from "viem";
23+
import { sepolia as chain } from "viem/chains";
2424

2525
const publicClient = createPublicClient({
2626
chain,
2727
transport: http(),
28-
})
28+
});
2929
```
3030

3131
### 2. Set up a Bundler Client
3232

3333
Set up a [Viem Bundler Client](https://viem.sh/account-abstraction/clients/bundler) using Viem's `createBundlerClient` function. This lets you use the bundler service to estimate gas for user operations and submit transactions to the network.
3434

3535
```typescript
36-
import { createBundlerClient } from 'viem/account-abstraction'
36+
import { createBundlerClient } from "viem/account-abstraction";
3737

3838
const bundlerClient = createBundlerClient({
3939
client: publicClient,
40-
transport: http('https://your-bundler-rpc.com'),
41-
})
40+
transport: http("https://your-bundler-rpc.com"),
41+
});
4242
```
4343

4444
### 3. Create a MetaMask smart account
4545

46-
[Create a MetaMask smart account](../how-to/create-smart-account/index.md) to send first user operation.
46+
[Create a MetaMask smart account](../how-to/create-smart-account/index.md) to send the first user operation.
4747

4848
This example configures a [Hybrid](../how-to/create-smart-account/configure-accounts-signers.md#configure-a-hybrid-smart-account) smart account:
4949

5050
```typescript
51-
import { Implementation, toMetaMaskSmartAccount } from '@metamask/delegation-toolkit'
52-
import { privateKeyToAccount } from 'viem/accounts'
51+
import { Implementation, toMetaMaskSmartAccount } from "@metamask/delegation-toolkit";
52+
import { privateKeyToAccount } from "viem/accounts";
5353

54-
const account = privateKeyToAccount('0x...')
54+
const account = privateKeyToAccount("0x...");
5555

5656
const smartAccount = await toMetaMaskSmartAccount({
5757
client: publicClient,
5858
implementation: Implementation.Hybrid,
5959
deployParams: [account.address, [], [], []],
60-
deploySalt: '0x',
60+
deploySalt: "0x",
6161
signatory: { account },
62-
})
62+
});
6363
```
6464

6565
### 4. Send a user operation
@@ -72,21 +72,21 @@ The smart account will remain counterfactual until the first user operation. If
7272
deployed, it will be automatically deployed upon the sending first user operation.
7373

7474
```ts
75-
import { parseEther } from 'viem'
75+
import { parseEther } from "viem";
7676

7777
// Appropriate fee per gas must be determined for the specific bundler being used.
78-
const maxFeePerGas = 1n
79-
const maxPriorityFeePerGas = 1n
78+
const maxFeePerGas = 1n;
79+
const maxPriorityFeePerGas = 1n;
8080

8181
const userOperationHash = await bundlerClient.sendUserOperation({
8282
account: smartAccount,
8383
calls: [
8484
{
85-
to: '0x1234567890123456789012345678901234567890',
86-
value: parseEther('1'),
85+
to: "0x1234567890123456789012345678901234567890",
86+
value: parseEther("1"),
8787
},
8888
],
8989
maxFeePerGas,
9090
maxPriorityFeePerGas,
91-
})
91+
});
9292
```

0 commit comments

Comments
 (0)