Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/hip-3-pusher/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ wheels/

# Virtual environments
.venv

# Config files
config/config.toml
64 changes: 64 additions & 0 deletions apps/hip-3-pusher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,67 @@ Currently it:
- Sources market data from Hyperliquid, Pyth Lazer, and Pythnet
- Supports KMS for signing oracle updates
- Provides telemetry to Pyth's internal observability system

## Prerequisites
#### Required Software
- Python 3.13 (required)
- [uv](https://docs.astral.sh/uv/)
- Hyperliquid wallet
- Docker (optional, for containerized deployment)

#### Required Accounts & Keys
- Hyperliquid Account: An Ethereum-style private key for the oracle pusher account
- API Keys:
- Pyth Pro API key (for Pro price feeds)
- SEDA API key (optional, if using SEDA feeds)
- AWS KMS (optional): For secure key management if using KMS signing

## Configuration

Create a configuration file by copying the sample:

```bash
cd apps/hip-3-pusher
cp config/config.sample.toml config/config.toml
# Edit config.toml with your settings

- Update Hyperliquid `oracle_pusher_key_path`, feed IDs, and URLs.
- Set `enable_publish = true` once you are ready to send real updates.
- If using KMS, set `kms.enable_kms = true` and provide `aws_kms_key_id_path`.
- If using multisig, set `multisig.enable_multisig = true` and `multisig_address`.

```

## SetUp

### Method 1: Using uv (Recommended)
```bash
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

cd apps/hip-3-pusher

# Install dependencies
uv sync

uv run -m pusher.main -c config/config.toml

# Set custom log level
LOG_LEVEL=DEBUG uv run -m pusher.main -c config/config.toml
```

### Method 2: Using Docker

```bash
cd apps/hip-3-pusher

# Build from the repository root
docker build -f Dockerfile -t hip-3-pusher .

# Run the container
docker run --rm \
-p 9090:9090 \
-v "$(pwd)/apps/hip-3-pusher/config/config.toml:/app/config/config.toml" \
hip-3-pusher
Comment on lines +67 to +71
Copy link
Contributor

Choose a reason for hiding this comment

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

In addition you'd probably need to mount the oracle updater private key to something like /private-key.txt and specify this path in the config.toml.

```

10 changes: 10 additions & 0 deletions apps/hip-3-pusher/config/config.sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ feed_ids = [
"2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b" # USDT
]

[seda]
# Optional: SEDA is enabled only when `feeds` is non-empty.
# This section is still required for config validation.
url = "https://example.com/seda/endpoint"
api_key_path = "/path/to/seda_api_key.txt"
poll_interval = 5.0
poll_failure_interval = 5.0
poll_timeout = 5.0
feeds = {}

[price.oracle]
BTC = [
{ source_type = "single", source = { source_name = "hl_oracle", source_id = "BTC" } },
Expand Down