@@ -71,34 +71,34 @@ You need to import some dependencies into your Node REPL session.
71
71
72
72
``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L3-L4 hash=57a929d665f2e5e4a7ecd085ad3d0b01
73
73
```
74
-
74
+
75
75
## Set session variables
76
76
77
77
You'll need a few variables throughout this tutorial. Let's set those up now.
78
78
79
79
<Steps >
80
80
{ <h3 >Import RPC URLs</h3 >}
81
81
82
- ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L9-L10 hash=014f5d17eddb45fc081c7db9f33361b4
82
+ ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L13-L14 hash=6be30f5429fdd050fc32c21de4627d2e
83
83
```
84
84
85
85
{ <h3 >Set the deposit to trace</h3 >}
86
86
87
87
You'll be tracing a specific deposit in this tutorial. Deposit tracing is generally based on the transaction hash of the transaction that triggered the deposit. You can replace this transaction hash with your own if you'd like.
88
88
89
- ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L14 hash=367c797c3e9746addedf43857f789eeb
89
+ ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L17 hash=367c797c3e9746addedf43857f789eeb
90
90
```
91
91
92
92
{ <h3 >Set the withdrawal to trace</h3 >}
93
93
94
94
You'll also be tracing a specific withdrawal in this tutorial. Like with deposits, withdrawal tracing is generally based on the transaction hash of the transaction that triggered the withdrawal. You can replace this transaction hash with your own if you'd like.
95
95
96
- ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L15 hash=545d1eed00ad0a235e2c79c8a87efd30
96
+ ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L18 hash=545d1eed00ad0a235e2c79c8a87efd30
97
97
```
98
98
99
99
{ <h3 >Create the RPC providers</h3 >}
100
100
101
- ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L16-L25 hash=067eb34f545b809ac450a5dd5d06dd09
101
+ ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L20-L28 hash=6286672ca3163543e9d8ddeb5b1b6477
102
102
```
103
103
</Steps >
104
104
@@ -111,21 +111,21 @@ You can use viem to trace a deposit.
111
111
112
112
You can query for the deposit status using the transaction hash of the deposit.
113
113
114
- ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L28-L29 hash=bbde51077bd7a3539e03ffc406daf25f
114
+ ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L30-L32 hash=b3693011e87b605cdd29baeffb080b9a
115
115
```
116
116
117
117
{ <h3 >Get the deposit transaction receipt</h3 >}
118
118
119
119
Retrieve the transaction receipt for the deposit using the viem client.
120
120
121
- ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L32- L34 hash=077581a56fc7b26f62589f0a6ae99e0d
121
+ ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L34-L36 hash=077581a56fc7b26f62589f0a6ae99e0d
122
122
```
123
123
124
124
{ <h3 >Get the deposit transaction</h3 >}
125
125
126
126
You can directly query for the L2 transaction that executed the deposit.
127
127
128
- ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L36- L38 hash=c67f0abeef0f2f817b7fb04be8f157a6
128
+ ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L38-L40 hash=c67f0abeef0f2f817b7fb04be8f157a6
129
129
```
130
130
</Steps >
131
131
@@ -138,21 +138,21 @@ You can use viem's functions to trace a withdrawal.
138
138
139
139
Like deposits, withdrawals can have multiple statuses depending on where they are in the process.
140
140
141
- ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L40- L42 hash=55ceda3d9d2f9abf037f8b259de14f26
141
+ ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L42-L44 hash=55ceda3d9d2f9abf037f8b259de14f26
142
142
```
143
143
144
144
{ <h3 >Get the withdrawal transaction receipt</h3 >}
145
145
146
146
Retrieve the L1 transaction receipt for the withdrawal.
147
147
148
- ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L44- L46 hash=d784970abbfd37215d33274d60173ab2
148
+ ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L46-L48 hash=d784970abbfd37215d33274d60173ab2
149
149
```
150
150
151
151
{ <h3 >Get the withdrawal transaction</h3 >}
152
152
153
153
Directly query for the L1 transaction that executed the withdrawal.
154
154
155
- ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L48- L50 hash=48358bc45243db4e69de6ed3d49a67f9
155
+ ``` js file=<rootDir>/public/tutorials/sdk-trace-txns.js#L50-L52 hash=48358bc45243db4e69de6ed3d49a67f9
156
156
```
157
157
</Steps >
158
158
0 commit comments