Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add hyperdrivetypes python package #1134

Merged
merged 24 commits into from
Aug 29, 2024
Merged

add hyperdrivetypes python package #1134

merged 24 commits into from
Aug 29, 2024

Conversation

dpaiton
Copy link
Member

@dpaiton dpaiton commented Aug 16, 2024

This PR adds a hyperdrivetypes python package and deploy scripts to upload it to pypi.

hyperdrivetypes is a pip installable Python package that contains type definitions for all built contracts in the Hyperdrive repository. This is useful for using Python to mock deployments, execute on-chain transactions, simulate transactions, etc.

This is currently a core dependency in agent0, although we only create types for a small subset of contracts. By moving the project into hyperdrive and processing all contracts, we are able to expand our capabilities. In particular, our first goal is to transition a majority of the integration fuzz tests out of solidity and into python using hyperdrivetypes and agent0.

The generated files are git ignored. If you wish to inspect them, check out the branch and run make build, which will now build the solidity files and generate the corresponding python type files.

The python package version is set up to match the Hyperdrive version specified in Constants.sol. This is accomplished through some script-fu and is automatic when running make build and in CI.

The package already exists here: https://pypi.org/project/hyperdrivetypes

@dpaiton dpaiton linked an issue Aug 22, 2024 that may be closed by this pull request
@dpaiton dpaiton force-pushed the dpaiton/hypertypes branch 2 times, most recently from 7a97c9b to eb12a2a Compare August 22, 2024 18:22
@dpaiton dpaiton changed the title add hypertypes python package add hyperdrivetypes python package Aug 22, 2024
@dpaiton dpaiton force-pushed the dpaiton/hypertypes branch 4 times, most recently from 3f2a51c to 755bd76 Compare August 23, 2024 06:42
@dpaiton dpaiton marked this pull request as ready for review August 23, 2024 07:00
Copy link
Contributor

@jalextowle jalextowle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incredible! I have no comments. I’m just excited to use it

@dpaiton dpaiton marked this pull request as draft August 23, 2024 19:03
@slundqui slundqui marked this pull request as ready for review August 27, 2024 18:44
@slundqui
Copy link
Contributor

Waiting on the following PRs before merge:

delvtech/agent0#1667
delvtech/agent0#1668
delvtech/agent0#1669
delvtech/pypechain#125

@slundqui slundqui added this pull request to the merge queue Aug 29, 2024
Merged via the queue into main with commit 9857eb6 Aug 29, 2024
32 checks passed
@slundqui slundqui deleted the dpaiton/hypertypes branch August 29, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create hypertypes repo to enable agent0 fuzzing
3 participants