Skip to content

Commit 2e1d3a0

Browse files
authored
chore(cli): temp eofwrap pydantic fix. (#1216)
1 parent 38621dc commit 2e1d3a0

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/cli/eofwrap.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939

4040
@click.command()
41-
@click.argument("input", type=click.Path(exists=True, dir_okay=True, file_okay=True))
41+
@click.argument("input_path", type=click.Path(exists=True, dir_okay=True, file_okay=True))
4242
@click.argument("output_dir", type=click.Path(dir_okay=True, file_okay=False))
4343
@click.option("--traces", is_flag=True, type=bool)
4444
def eof_wrap(input_path: str, output_dir: str, traces: bool):
@@ -169,7 +169,16 @@ def wrap_file(self, in_path: str, out_path: str, traces: bool):
169169
return
170170

171171
with open(in_path, "r") as input_file:
172-
fixtures = BlockchainFixtures.from_json_data(json.load(input_file))
172+
data = json.load(input_file)
173+
# TODO: temp solution until `ethereum/tests` are updated with the FixtureConfig
174+
for _, f in data.items():
175+
if isinstance(f, dict) and "config" not in f:
176+
network = f.get("network")
177+
f["config"] = {
178+
"chainid": "0x1",
179+
"network": network,
180+
}
181+
fixtures = BlockchainFixtures.from_json_data(data)
173182

174183
out_fixtures = BaseFixturesRootModel({})
175184
fixture: BlockchainFixture

0 commit comments

Comments
 (0)