An open API service indexing awesome lists of open source software.

https://github.com/panukettu/pkxp-forge-pyth

Use pyth with forge
https://github.com/panukettu/pkxp-forge-pyth

forge oracles pyth solidity

Last synced: about 2 months ago
JSON representation

Use pyth with forge

Awesome Lists containing this project

README

        

# pyth-ffi

[![test](https://github.com/panukettu/forge-pyth-ffi/actions/workflows/test.yml/badge.svg)](https://github.com/panukettu/forge-pyth-ffi/actions/workflows/test.yml)

Gets and/or updates pyth prices within forge scripts using ffi.

## Requirements

**foundry**

```shell
curl -L https://foundry.paradigm.xyz | bash
```

**bun**

```shell
curl -fsSL https://bun.sh/install | bash
```

## Usage

1. `bun install`

2. Set your hermes endpoint(s) in: ts/config.ts. If the request fails it will iterate to the next one.

3. See `scripts/ExampleScript.s.sol` or `test/Pyth.t.sol` for examples.