Git Product home page Git Product logo

pyth-fuel's Introduction

Pyth-integration

NOTE: The project is a WIP.

An implementation of a Pyth Network oracle contract in Sway. Utilising minimal, internal Wormhole functionality and state.

Interfaces

The project provides four interfaces for interaction with the oracle contract:

  • PythCore - provides the core functionality to required to utilise the oracle; getting fees, updating prices and fetching prices.
  • PythInit - provides the functionality to setup the oracle's state.
  • PythInfo - provides additional information about the oracle's state.
  • WormholeGuardians - provides functionality to maintain and query the wormhole-state-elements used by the oracle.

Running the project

Project

Run the following commands from the root of the repository.

Program compilation

forc build

Running the tests

Before running the tests the programs must be compiled with the command above.

cargo test

Before deploying

Before deploying the oracle contract; the deployer must be set to the address of the deploying wallet in the storage block, so that the deployer can setup the contract with the constructor() method.

Parameters for the constructor() method can be seen in the tests of the method, which at the time of writing uses the real up-to-date values as per Pyth's documentation and EVM integrations. Care should be taken to ensure that the most up-to-date values are used for the constructor() method's parameters.

Fuel Beta-5 network deployment:

The Pyth oracle contract has been deployed to Beta-5 at the ContractId: 0xe69daeb9fcf4c536c0fe402403b4b9e9822cc8b1f296e5d754be12cc384554c5.

pyth-fuel's People

Contributors

k1-r1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.