Skip to content

Pythflow#110

Open
sama64 wants to merge 11 commits intopyth-network:mainfrom
JuanmeGarcia:main
Open

Pythflow#110
sama64 wants to merge 11 commits intopyth-network:mainfrom
JuanmeGarcia:main

Conversation

@sama64
Copy link

@sama64 sama64 commented Mar 22, 2026

Pyth Examples Contribution

Type of Contribution

  • New Example Project (Adding a new example to demonstrate Pyth integration)
  • Bug Fix (Fixing an issue in existing examples)
  • Documentation Update (Improving README, comments, or guides)
  • Enhancement (Improving existing functionality or adding features)
  • [ x] Hackathon Submission (Submitting a project from a hackathon)

Project Information

Project/Example Name:

Pyth Product Used:

  • [x ] Pyth Price Feeds
  • Pyth Entropy
  • Multiple Products
  • Other: ___________

Blockchain/Platform:

  • Ethereum/EVM
  • Solana
  • Aptos
  • Sui
  • Fuel
  • Starknet
  • TON
  • [ x] Other: cardano

Description

What does this contribution do?

pythathon project.

How does it integrate with Pyth?

consumes pyth price feed.

What problem does it solve or demonstrate?

facilitates the building and visualization of smart contracts and transactions.

Directory Structure (for new examples)
lazer/cardano/
├── on-chain/ # aiken smart contract (plutusv3 validator)
│ ├── validators/
│ │ └── price_validator.ak
│ ├── lib/
│ │ └── pyth_types.ak
│ └── aiken.toml
├── front/ # next.js frontend application
│ ├── src/
│ │ ├── app/api/ # api routes (price, tx/lock, tx/spend, etc.)
│ │ ├── components/ # react flow nodes and panels
│ │ ├── store/ # zustand pipeline state
│ │ ├── lib/ # cardano tx building, pyth client, decision logic
│ │ └── types/ # typescript types matching aiken constructors
│ └── .env.example
├── README.md # project documentation
└── ...
Testing & Verification
How to Test This Contribution
Prerequisites
node.js version: 20+
aiken: v1.1+
a blockfrost api key (preprod): https://blockfrost.io/
a pyth lazer access token: https://docs.pyth.network/lazer
Setup & Run Instructions

build the on-chain validator

cd lazer/cardano/on-chain
aiken build

configure and run the frontend

cd ../front
cp .env.example .env

fill in PYTH_ACCESS_TOKEN and BLOCKFROST_API_KEY in .env

npm install
npm run dev

open http://localhost:3000

copy the burner wallet address from the sidebar

fund it via the cardano testnet faucet: https://docs.cardano.org/cardano-testnets/tools/faucet/

press the play button to run the full escrow pipeline

Deployment Information (if applicable)
Network: cardano preprod

Contract Address(es): validator parameterized by pyth policy id d799d287105dea9377cdf9ea8502a83d2b9eb2d2050a8aea800a21e6 — script hash 4a7a08635fff21b50169cba07b317016d203b233a015e7da4adc1eb9

Demo URL: n/a (local only)

Checklist
Code Quality

code follows existing patterns in the repository

proper error handling implemented

no hardcoded values (use environment variables where appropriate)
Testing

tested locally and works as expected

all existing functionality still works (no breaking changes)
Additional Context
Related Issues
n/a — new example

JuanmeGarcia and others added 11 commits March 22, 2026 10:59
…on routes

- Updated the example environment file with a new Blockfrost API key.
- Refactored server.ts to import configuration values directly from config.js.
- Modified script.ts to adjust the path for loading Plutus scripts.
- Enhanced health route to include network status in the response.
- Improved transaction routes to support dry runs and better error handling.
- Updated UTXO route to allow fetching based on wallet or script address.
- Adjusted frontend API client to return UTXO data more efficiently.
- Deleted the entire API directory, including configuration files, routes, services, and middleware.
- Removed the example environment file and package configuration files.
- Cleaned up all related TypeScript files and documentation for a streamlined project structure.
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.

3 participants