Skip to content

Commit 32bb82d

Browse files
committed
updated codebase
1 parent 7257426 commit 32bb82d

File tree

3 files changed

+6
-30
lines changed

3 files changed

+6
-30
lines changed

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

pages/builders/app-developers/tutorials/sdk-trace-txns.mdx

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -118,21 +118,14 @@ You can use viem to trace a deposit.
118118

119119
Retrieve the transaction receipt for the deposit using the viem client.
120120

121-
```js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L32-L33 hash=c02e1e5544325e0d0f2cda9f7a16eff4
122-
```
123-
124-
{<h3>Parse deposit logs</h3>}
125-
126-
Parse the logs from the deposit receipt for more detailed information.
127-
128-
```js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L35-L38 hash=be1c79d9e6e8835d2e57683374576254
121+
```js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L32-L34 hash=077581a56fc7b26f62589f0a6ae99e0d
129122
```
130123

131124
{<h3>Get the deposit transaction</h3>}
132125

133126
You can directly query for the L2 transaction that executed the deposit.
134127

135-
```js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L41-L42 hash=a8a37697d0f9104f5063f9bd83b48b04
128+
```js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L36-L38 hash=c67f0abeef0f2f817b7fb04be8f157a6
136129
```
137130
</Steps>
138131

@@ -145,28 +138,21 @@ You can use viem's functions to trace a withdrawal.
145138

146139
Like deposits, withdrawals can have multiple statuses depending on where they are in the process.
147140

148-
```js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L45-L46 hash=6e1e7effc1a3de528e3812b07e7eba73
141+
```js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L40-L42 hash=55ceda3d9d2f9abf037f8b259de14f26
149142
```
150143

151144
{<h3>Get the withdrawal transaction receipt</h3>}
152145

153146
Retrieve the L1 transaction receipt for the withdrawal.
154147

155-
```js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L49-L50 hash=cbf6d336f5426e0f3068364a8d0c4823
156-
```
157-
158-
{<h3>Parse withdrawal logs</h3>}
159-
160-
Parse the logs from the withdrawal receipt to get more details.
161-
162-
```js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L52-L55 hash=306348abf2d949d7598b77b21d27178e
148+
```js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L44-L46 hash=d784970abbfd37215d33274d60173ab2
163149
```
164150

165151
{<h3>Get the withdrawal transaction</h3>}
166152

167153
Directly query for the L1 transaction that executed the withdrawal.
168154

169-
```js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L58-L59 hash=366c52f3a502fa70c9d814a416fb9e12
155+
```js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L48-L50 hash=48358bc45243db4e69de6ed3d49a67f9
170156
```
171157
</Steps>
172158

public/tutorials/sdk-trace-txns.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ console.log('Grabbing deposit receipt...')
3333
const depositReceipt = await l2Client.getTransaction({ hash: depositHash });
3434
console.log(depositReceipt);
3535

36-
const depositLogs = depositReceipt.logs;
37-
depositLogs.forEach(log => {
38-
console.log(log);
39-
});
40-
4136
console.log('Grabbing deposit txn...')
4237
const depositTransaction = await l2Client.getTransaction({ hash: depositHash });
4338
console.log(depositTransaction);
@@ -50,11 +45,6 @@ console.log('Grabbing withdrawal receipt...')
5045
const withdrawalReceipt = await l1Client.getTransaction({ hash: withdrawalHash });
5146
console.log(withdrawalReceipt);
5247

53-
const withdrawalLogs = withdrawalReceipt.logs;
54-
withdrawalLogs.forEach(log => {
55-
console.log(log);
56-
});
57-
5848
console.log('Grabbing withdrawal txn...')
5949
const withdrawalTransaction = await l1Client.getTransaction({ hash: withdrawalHash });
6050
console.log(withdrawalTransaction);

0 commit comments

Comments
 (0)