Commit 69b520d
fix(cast): detect OP Stack chains early in
`cast run` on OP Stack chains (Base, Optimism) fails with:
`data did not match any variant of untagged enum BlockTransactions`
Root cause: the generic `FoundryEvmNetwork` refactor (PR #14121) changed
`cast run` from using `AnyNetwork` to dispatching via `FEN::Network`.
Non-Tempo chains use `EthEvmNetwork` whose `Network = Ethereum`, which
cannot deserialize OP deposit transactions (type 0x7e).
Fix: decouple the RPC provider network type from the EVM factory by making
`run_with_provider` generic over both `FEN` (EVM factory) and `N`
(provider network). The dispatch in `run()` now detects OP Stack chains
early via `is_optimism()` and uses `FoundryNetwork` as the provider
network, which supports all transaction types including OP deposits.
Co-Authored-By: zerosnacks <95942363+zerosnacks@users.noreply.github.com>cast run
1 parent 4028d1a commit 69b520d
3 files changed
Lines changed: 22 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
142 | 148 | | |
143 | | - | |
| 149 | + | |
144 | 150 | | |
145 | 151 | | |
146 | 152 | | |
147 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
148 | 162 | | |
149 | 163 | | |
150 | 164 | | |
| |||
157 | 171 | | |
158 | 172 | | |
159 | 173 | | |
160 | | - | |
| 174 | + | |
161 | 175 | | |
162 | 176 | | |
163 | 177 | | |
| |||
217 | 231 | | |
218 | 232 | | |
219 | 233 | | |
220 | | - | |
| 234 | + | |
221 | 235 | | |
222 | 236 | | |
223 | 237 | | |
| |||
0 commit comments