Skip to main content

hyper-vyper

A cartoon snake in a hoodie codes on a laptop

Library checks License: MIT

Build Vyper contracts on HyperEVM that read and write to HyperCore.

hyper-vyper gives your HyperEVM contracts one typed interface to HyperCore, so you can work on your protocol instead of byte layouts and decimal conversions:

  • Read Core state: balances, perp positions, prices, and token and market metadata.
  • Send CoreWriter actions: orders, cancels, transfers, staking, vault moves and account settings.
  • Bridge assets (USDC, HYPE and linked ERC-20 tokens) between HyperEVM and HyperCore, with the decimal conversions done for you.
  • Test without a testnet: hyper_vyper.testing adds a HyperCore simulator to your Titanoboa tests.

The library has no state and nothing to deploy. It is a Vyper port of the Solidity hyper-evm-lib, and its tests compare each function that both libraries share.

hyper-vyper is open source under the MIT license and maintained by CrowdCent.

Unaudited. This library is provided as is. Read security before you use it with funds.

Module Purpose
precompiles Read Core balances, positions, prices and metadata
core_writer Encode and send CoreWriter actions: orders, transfers, staking and more
conversions Convert amounts between EVM, Core and order-size units, and perp IDs
bridge Move USDC, HYPE and linked ERC-20 tokens between HyperEVM and HyperCore
constants Addresses, action headers and enum values
from hyper_vyper import constants
from hyper_vyper import precompiles

@external
@view
def core_usdc_balance(user: address) -> uint64:
    return precompiles.spot_balance(user, constants.USDC_TOKEN_INDEX).total

Installation

hyper-vyper is a Python package of Vyper modules. Vyper finds them on the Python path, so you don't need a -p option.

uv add hyper-vyper        # or: pip install hyper-vyper

The package pins Vyper 0.4.3 exactly. Every module has # pragma version 0.4.3, and the library is tested only on 0.4.3. Use the Cancun EVM version.

The testing extra adds hyper_vyper.testing, a HyperCore simulator for Titanoboa tests (uv add --dev "hyper-vyper[testing]"):

from hyper_vyper.testing import CoreSim, Policy

See install and quick start, which also shows Moccasin, and the testing quick start.

Documentation

The documentation site is at crowdcent.github.io/hyper-vyper.

To preview the docs site locally, see contributing.

Development

uv sync --locked
uv run --locked hyper-vyper-check-source src examples tutorials
uv run --locked pytest

See repository tests and contributing. examples/ holds example contracts, and tutorials/ holds the tutorial contracts and scripts. Report security problems as described in SECURITY.md.

Acknowledgements

License

MIT. The Solidity reference sources in tests/reference/ keep their own MIT licenses.

Metadata

Release files for hyper-vyper 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hyper-vyper 0.1.1
File Size Uploaded Provenance Actions
hyper_vyper-0.1.1.tar.gz 44.8 kB With provenance Details for hyper_vyper-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hyper-vyper 0.1.1
File Interpreter ABI Platform Actions
hyper_vyper-0.1.1-py3-none-any.whl Python 3 none any Details for hyper_vyper-0.1.1-py3-none-any.whl

Total release size: 94.4 kB

Release files / hyper_vyper-0.1.1.tar.gz

Download URL hyper_vyper-0.1.1.tar.gz
Size 44.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bf9f3e05246483bd72202c33b37360355dee1918bb2234cfa0f3908123919cc3
BLAKE2b-256 checksum
How to use checksums
7c5a23e268c4bad580581a8beb6e67ba106051f4cda2a55cae2905d2c7cf7d44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / hyper_vyper-0.1.1-py3-none-any.whl

Download URL hyper_vyper-0.1.1-py3-none-any.whl
Size 49.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f29c02ccc6c30711a095eade70f7fc5a9ba6c6be1e2c60efd7d414f689a88c56
BLAKE2b-256 checksum
How to use checksums
087849882c275533b302e8a74b34496de849476dda9564a5edc60bd8b8ea9160
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for hyper-vyper 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hyper_vyper-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page