Skip to content

Commit fa91666

Browse files
update code snippets to use sepolia
1 parent 822eb99 commit fa91666

12 files changed

Lines changed: 45 additions & 45 deletions

File tree

delegation-toolkit/concepts/environment.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
} from "@metamask/delegation-toolkit";
4343
import { privateKeyToAccount } from "viem/accounts";
4444
import { createPublicClient, http } from "viem";
45-
import { lineaSepolia as chain } from "viem/chains";
45+
import { sepolia as chain } from "viem/chains";
4646

4747
const publicClient = createPublicClient({
4848
chain,
@@ -79,8 +79,8 @@ import {
7979
DeleGatorEnvironment,
8080
} from "@metamask/delegation-toolkit";
8181

82-
// Resolves the DeleGatorEnvironment for Linea Sepolia
83-
const environment: DeleGatorEnvironment = getDelegatorEnvironment(59141);
82+
// Resolves the DeleGatorEnvironment for Sepolia
83+
const environment: DeleGatorEnvironment = getDelegatorEnvironment(11155111);
8484
```
8585

8686
## Deploy custom delegator environment
@@ -97,7 +97,7 @@ Your wallet must have sufficient native token balance to deploy the contracts.
9797

9898
```typescript
9999
import { walletClient, publicClient } from "./config.ts";
100-
import { lineaSepolia as chain } from "viem/chains";
100+
import { sepolia as chain } from "viem/chains";
101101
import { deployDeleGatorEnvironment } from "@metamask/delegation-toolkit/utils";
102102

103103
const environment = await deployDeleGatorEnvironment(
@@ -112,7 +112,7 @@ const environment = await deployDeleGatorEnvironment(
112112

113113
```typescript
114114
import { privateKeyToAccount } from "viem/accounts";
115-
import { lineaSepolia as chain } from "viem/chains";
115+
import { sepolia as chain } from "viem/chains";
116116
import { http, createWalletClient, createPublicClient } from "viem";
117117

118118
// Your deployer wallet private key.
@@ -140,7 +140,7 @@ For example, if you've already deployed the `EntryPoint` contract on the target
140140
```typescript
141141
// The config.ts is the same as in the previous example.
142142
import { walletClient, publicClient } from "./config.ts";
143-
import { lineaSepolia as chain } from "viem/chains";
143+
import { sepolia as chain } from "viem/chains";
144144
import { deployDeleGatorEnvironment } from "@metamask/delegation-toolkit/utils";
145145

146146
const environment = await deployDeleGatorEnvironment(
@@ -165,7 +165,7 @@ To override the delegator environment, the toolkit provides a `overrideDeployedE
165165
```typescript
166166
// The config.ts is the same as in the previous example.
167167
import { walletClient, publicClient } from "./config.ts";
168-
import { lineaSepolia as chain } from "viem/chains";
168+
import { sepolia as chain } from "viem/chains";
169169
import { DeleGatorEnvironment } from "@metamask/delegation-toolkit";
170170
import {
171171
overrideDeployedEnvironment,
@@ -190,7 +190,7 @@ If you've already deployed the contracts using a different method, you can creat
190190
```typescript
191191
// remove-start
192192
- import { walletClient, publicClient } from "./config.ts";
193-
- import { lineaSepolia as chain } from "viem/chains";
193+
- import { sepolia as chain } from "viem/chains";
194194
// remove-end
195195
import { DeleGatorEnvironment } from "@metamask/delegation-toolkit";
196196
import {

delegation-toolkit/get-started/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This client will let the delegator account query the signer's account state and
2222

2323
```typescript
2424
import { createPublicClient, http } from "viem";
25-
import { lineaSepolia as chain } from "viem/chains";
25+
import { sepolia as chain } from "viem/chains";
2626

2727
const publicClient = createPublicClient({
2828
chain,

delegation-toolkit/how-to/configure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import {
3737
createBundlerClient,
3838
} from "viem/account-abstraction";
3939
import { http } from "viem";
40-
import { lineaSepolia as chain } from "viem/chains";
40+
import { sepolia as chain } from "viem/chains";
4141

4242
// Replace these URLs with your actual bundler and paymaster endpoints.
4343
const bundlerUrl = "https://your-bundler-url.com";

delegation-toolkit/how-to/create-delegation/create-custom-caveat-enforcer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const delegation = createDelegation({
122122

123123
```typescript
124124
import { createPublicClient, http } from "viem";
125-
import { lineaSepolia as chain } from "viem/chains";
125+
import { sepolia as chain } from "viem/chains";
126126
import {
127127
Implementation,
128128
toMetaMaskSmartAccount,

delegation-toolkit/how-to/create-delegation/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const delegation = createDelegation({
6060

6161
```typescript
6262
import { createPublicClient, http } from "viem";
63-
import { lineaSepolia as chain } from "viem/chains";
63+
import { sepolia as chain } from "viem/chains";
6464
import {
6565
Implementation,
6666
toMetaMaskSmartAccount,
@@ -113,7 +113,7 @@ const openRootDelegation = createOpenDelegation({
113113

114114
```typescript
115115
import { createPublicClient, http } from "viem";
116-
import { lineaSepolia as chain } from "viem/chains";
116+
import { sepolia as chain } from "viem/chains";
117117
import {
118118
Implementation,
119119
toMetaMaskSmartAccount,
@@ -186,7 +186,7 @@ const leafDelegation = createDelegation({
186186

187187
```typescript
188188
import { createPublicClient, http } from "viem";
189-
import { lineaSepolia as chain } from "viem/chains";
189+
import { sepolia as chain } from "viem/chains";
190190
import {
191191
Implementation,
192192
toMetaMaskSmartAccount,
@@ -259,7 +259,7 @@ const leafDelegation = createOpenDelegation({
259259

260260
```typescript
261261
import { createPublicClient, http } from "viem";
262-
import { lineaSepolia as chain } from "viem/chains";
262+
import { sepolia as chain } from "viem/chains";
263263
import {
264264
Implementation,
265265
toMetaMaskSmartAccount,
@@ -321,7 +321,7 @@ const signedDelegation = {
321321

322322
```typescript
323323
import { createPublicClient, http } from "viem";
324-
import { lineaSepolia as chain } from "viem/chains";
324+
import { sepolia as chain } from "viem/chains";
325325
import {
326326
Implementation,
327327
toMetaMaskSmartAccount,

delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const smartAccount = await toMetaMaskSmartAccount({
6969

7070
```typescript
7171
import { http, createPublicClient } from "viem";
72-
import { lineaSepolia as chain } from "viem/chains";
72+
import { sepolia as chain } from "viem/chains";
7373

7474
const transport = http();
7575
export const publicClient = createPublicClient({
@@ -126,7 +126,7 @@ const smartAccount = await toMetaMaskSmartAccount({
126126

127127
```typescript
128128
import { http, createPublicClient } from "viem";
129-
import { lineaSepolia as chain } from "viem/chains";
129+
import { sepolia as chain } from "viem/chains";
130130

131131
const transport = http();
132132
export const publicClient = createPublicClient({
@@ -141,7 +141,7 @@ export const publicClient = createPublicClient({
141141

142142
```typescript
143143
import { privateKeyToAccount, generatePrivateKey } from "viem/accounts";
144-
import { lineaSepolia as chain } from "viem/chains";
144+
import { sepolia as chain } from "viem/chains";
145145
import { http, createWalletClient } from "viem";
146146

147147
const privateKey = generatePrivateKey();
@@ -202,7 +202,7 @@ const smartAccount = await toMetaMaskSmartAccount({
202202

203203
```typescript
204204
import { http, createPublicClient } from "viem";
205-
import { lineaSepolia as chain } from "viem/chains";
205+
import { sepolia as chain } from "viem/chains";
206206

207207
const transport = http();
208208
export const publicClient = createPublicClient({
@@ -277,7 +277,7 @@ const smartAccount = await toMetaMaskSmartAccount({
277277

278278
```typescript
279279
import { http, createPublicClient } from "viem";
280-
import { lineaSepolia as chain } from "viem/chains";
280+
import { sepolia as chain } from "viem/chains";
281281

282282
const transport = http();
283283
export const publicClient = createPublicClient({
@@ -291,7 +291,7 @@ export const publicClient = createPublicClient({
291291

292292
```typescript
293293
import { privateKeyToAccount, generatePrivateKey } from "viem/accounts";
294-
import { lineaSepolia as chain } from "viem/chains";
294+
import { sepolia as chain } from "viem/chains";
295295
import { http, createWalletClient } from "viem";
296296

297297
// This private key will be used to generate the first signer.

delegation-toolkit/how-to/create-smart-account/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const smartAccount = await toMetaMaskSmartAccount({
5353
```typescript
5454
import { http, createPublicClient } from "viem";
5555
import { privateKeyToAccount, generatePrivateKey } from "viem/accounts";
56-
import { lineaSepolia as chain } from "viem/chains";
56+
import { sepolia as chain } from "viem/chains";
5757

5858
const transport = http();
5959
export const publicClient = createPublicClient({

delegation-toolkit/how-to/generate-multisig-signature.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const aggregatedSignature = aggregateSignature({
7575
import { createPublicClient, http } from "viem";
7676
import { generatePrivateKey, privateKeyToAccount } from "viem/accounts";
7777
import { createBundlerClient } from "viem/account-abstraction";
78-
import { lineaSepolia as chain } from "viem/chains";
78+
import { sepolia as chain } from "viem/chains";
7979
import {
8080
Implementation,
8181
toMetaMaskSmartAccount,

delegation-toolkit/how-to/redeem-delegation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ export const delegateSmartAccount = await toMetaMaskSmartAccount({
103103

104104
```typescript
105105
import { createPublicClient, http } from "viem";
106-
import { lineaSepolia as chain } from "viem/chains";
106+
import { sepolia as chain } from "viem/chains";
107107
import { createBundlerClient } from "viem/account-abstraction";
108108
import { createPimlicoClient } from "permissionless/clients/pimlico";
109109

110110
// You can get the API Key from the Pimlico dashboard.
111-
const pimlicoUrl = "https://api.pimlico.io/v2/59141/rpc";
111+
const pimlicoUrl = "https://api.pimlico.io/v2/11155111/rpc";
112112

113113
export const publicClient = createPublicClient({
114114
chain,
@@ -144,7 +144,7 @@ import {
144144
} from "@metamask/delegation-toolkit";
145145
import { DelegationManager } from "@metamask/delegation-toolkit/contracts";
146146
import { SINGLE_DEFAULT_MODE } from "@metamask/delegation-toolkit/utils";
147-
import { lineaSepolia as chain } from "viem/chains";
147+
import { sepolia as chain } from "viem/chains";
148148
import { delegateWalletClient } from "./account.ts";
149149

150150
const delegations: Delegation[] = [ signedDelegation ];
@@ -179,7 +179,7 @@ const transactionHash = await walletClient.sendTransaction({
179179

180180
```typescript
181181
import { privateKeyToAccount } from "viem/accounts";
182-
import { lineaSepolia as chain } from "viem/chains";
182+
import { sepolia as chain } from "viem/chains";
183183
import { createWalletClient, http } from "viem";
184184

185185
const delegateAccount = privateKeyToAccount("0x...");
@@ -293,12 +293,12 @@ export const delegateSmartAccount = await toMetaMaskSmartAccount({
293293

294294
```typescript
295295
import { createPublicClient, http } from "viem";
296-
import { lineaSepolia as chain } from "viem/chains";
296+
import { sepolia as chain } from "viem/chains";
297297
import { createBundlerClient } from "viem/account-abstraction";
298298
import { createPimlicoClient } from "permissionless/clients/pimlico";
299299

300300
// You can get the API Key from the Pimlico dashboard.
301-
const pimlicoUrl = "https://api.pimlico.io/v2/59141/rpc";
301+
const pimlicoUrl = "https://api.pimlico.io/v2/11155111/rpc";
302302

303303
export const publicClient = createPublicClient({
304304
chain,

delegation-toolkit/how-to/send-user-operation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const userOperationHash = await bundlerClient.sendUserOperation({
6868
```typescript
6969
import { createPublicClient, http } from "viem";
7070
import { createBundlerClient } from "viem/account-abstraction";
71-
import { lineaSepolia as chain } from "viem/chains";
71+
import { sepolia as chain } from "viem/chains";
7272
import { generatePrivateKey, privateKeyToAccount } from "viem/accounts";
7373
import {
7474
Implementation,
@@ -128,7 +128,7 @@ import { bundlerClient, smartAccount } from "./config.ts" // The config.ts is th
128128

129129
// add-start
130130
+ const pimlicoClient = createPimlicoClient({
131-
+ transport: http("https://api.pimlico.io/v2/59141/rpc"), // You can get the API Key from the Pimlico dashboard.
131+
+ transport: http("https://api.pimlico.io/v2/11155111/rpc"), // You can get the API Key from the Pimlico dashboard.
132132
+ });
133133
+
134134
+ const { fast: fee } = await pimlicoClient.getUserOperationGasPrice();
@@ -160,7 +160,7 @@ import { createPimlicoClient } from "permissionless/clients/pimlico";
160160
import { bundlerClient, smartAccount } from "./config.ts" // The config.ts is the same as in the previous example.
161161
162162
const pimlicoClient = createPimlicoClient({
163-
transport: http("https://api.pimlico.io/v2/59141/rpc"), // You can get the API Key from the Pimlico dashboard.
163+
transport: http("https://api.pimlico.io/v2/11155111/rpc"), // You can get the API Key from the Pimlico dashboard.
164164
});
165165

166166
const { fast: fee } = await pimlicoClient.getUserOperationGasPrice();

0 commit comments

Comments
 (0)