Open
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pyth Examples Contribution
Type of Contribution
Project Information
Project/Example Name:
Pyth Product Used:
Blockchain/Platform:
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