Skip to content

Commit b71e587

Browse files
committed
changeup structure for easier importing
1 parent dc6b1bc commit b71e587

File tree

7 files changed

+19
-3
lines changed

7 files changed

+19
-3
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ artifacts/
2020
.venv
2121
build/
2222
dist/
23-
python/hyperdrivetypes/hyperdrivetypes
23+
python/hyperdrivetypes/hyperdrivetypes/types
2424

2525
# nix/shell extension - https://direnv.net/
2626
.direnv

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ build-sol:
1515
# forge build will do nothing if build-sol was previously run,
1616
# but we put it here so this can be called individually
1717
build-hyperdrivetypes:
18-
forge build && pypechain --output-dir python/hyperdrivetypes/hyperdrivetypes --line-length 80 out/ && . scripts/set-hyperdrivetypes-version.sh
18+
forge build && pypechain --output-dir python/hyperdrivetypes/hyperdrivetypes/types --line-length 80 out/ && . scripts/set-hyperdrivetypes-version.sh
1919

2020
### Test ###
2121

python/hyperdrivetypes/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# hyperdrivetypes
2+
3+
Python type definitions for [Hyperdrive](https://docs-delv.gitbook.io/hyperdrive).
4+
These were generated using [pypechain](https://github.com/delvtech/pypechain).
5+
6+
## Install
7+
8+
```
9+
pip install hyperdrivetypes
10+
```
11+
12+
Now you can import hyperdrive contracts directly into python, e.g. `from hyperdrivetypes import IHyperdriveContract`

python/hyperdrivetypes/__init__.py

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""Hyperdrive python type definitions."""
2+
3+
from .fixedpoint_types import *
4+
from .types import *
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .fixedpoint_types import CheckpointFP, FeesFP, PoolConfigFP, PoolInfoFP

0 commit comments

Comments
 (0)