-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat(gentest): use jinja2 templating in
gentest
(#900)
Co-authored-by: rahul <[email protected]> Co-authored-by: danceratopz <[email protected]>
- Loading branch information
1 parent
6fb195b
commit 295879d
Showing
7 changed files
with
370 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
""" | ||
Generate a Python blockchain test from a transaction hash. | ||
This script can be used to generate Python source for a blockchain test case | ||
that replays a mainnet or testnet transaction from its transaction hash. | ||
Requirements: | ||
1. Access to an archive node for the network where the transaction | ||
originates. A provider may be used. | ||
2. The transaction hash of a type 0 transaction (currently only legacy | ||
transactions are supported). | ||
Example Usage: | ||
1. Generate a test for a transaction with hash | ||
```console | ||
uv run gentest \ | ||
0xa41f343be7a150b740e5c939fa4d89f3a2850dbe21715df96b612fc20d1906be \ | ||
tests/paris/test_0xa41f.py | ||
``` | ||
2. Fill the test: | ||
```console | ||
fill --fork=Paris tests/paris/test_0xa41f.py | ||
``` | ||
Limitations: | ||
1. Only legacy transaction types (type 0) are currently supported. | ||
""" | ||
|
||
from .cli import generate # noqa: 401 |
Oops, something went wrong.