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 check that both libraries behave the same.

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
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 covers 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.0

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.0
File Size Uploaded
hyper_vyper-0.1.0.tar.gz 31.9 kB Details

Built distribution (wheel)

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

Total release size: 68.3 kB

Release files / hyper_vyper-0.1.0.tar.gz

Download URL hyper_vyper-0.1.0.tar.gz
Size 31.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b8a70a8b6cccd9019842313f6befed2cd30e786851af0b28f0418720e944af77
BLAKE2b-256 checksum
How to use checksums
7040700c4912aa64bf3b47977ebb07222b3e6abcfaf2382289e16cd60d80bc0e
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 Oct 14, 2026.

Transparency log

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

Download URL hyper_vyper-0.1.0-py3-none-any.whl
Size 36.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f7327c535f035df5e8275c21dcc789a9104570116de4257276e744eb2d0776d
BLAKE2b-256 checksum
How to use checksums
1aa945dd83cf012eb44eda52d0f3832435f8b86454c42a6a73b4339160635fae
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 Oct 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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