Go to file
Stanisław Drozd f0552e5f1b
pyth2wormhole-client: refactor into fully-async futures-based approach (#219)
* pyth2wormhole-client: refactor into fully-async futures-based approach

commit-id:2ed35045

* p2w-client: Change inconsistent rpc constructor

commit-id:cb3b2ff2

* p2w-client: Move job creation to a function, simplify comment

commit-id:35328b38

* pyth2wormhole-client: Use get_multiple_accounts

commit-id:7fc85157

* Implement a rate-limited mutex for RPC client

commit-id:1a243063

* pyth2wormhole-client: only guard beginning new requests in RLMutex

commit-id:d8251474

* pyth2wormhole-client: RLMutex: ensure the inner guard is not dropped

commit-id:c3513f5e

* pyth2wormhole-client: Clarify attestation_sched_futs comment

commit-id:97033670

* pyth2wormhole-client: Use CommitmentConfig's native FromStr parsing

commit-id:835d7125

* pyth2wormhole-client: doc comment typo

commit-id:5ee388de

* pyth2wormhole-client: move closures to their own async functions

This makes the main.rs async attestation routines easier to read.

commit-id:3565a744

* pyth2wormhole-client: fix merge typo

* pyth2wormhole-client: Apply Tom's readability advice

* pyth2wormhole-client reword attestation_sched_job() comment

* pyth2wormhole-client: expand attestation_sched_job() comment

* pyth2wormhole-client:   e  x  p  a  n  d   the comment

* Trigger CI

* p2w-client/main.rs: correct missing awaits after merge
2022-07-18 14:40:03 +02:00
.github Fix wrong branch names (#227) 2022-06-23 18:41:13 +02:00
devnet Add pyth-evm-watcher to tilt (#238) 2022-07-15 17:37:58 +02:00
ethereum Make Pyth contract abstract (#234) 2022-07-13 11:02:37 +01:00
scripts Abehjati/cleanup again (#215) 2022-05-20 12:43:31 +02:00
solana pyth2wormhole-client: refactor into fully-async futures-based approach (#219) 2022-07-18 14:40:03 +02:00
terra Abehjati/cleanup again (#215) 2022-05-20 12:43:31 +02:00
third_party pyth2wormhole-client: refactor into fully-async futures-based approach (#219) 2022-07-18 14:40:03 +02:00
tilt_modules Devnet arguments for BigTable connection. 2021-08-05 12:53:56 +00:00
.dockerignore pyth2wormhole: build + deploy program into local devnet 2021-09-09 14:39:31 +02:00
.gitignore Abehjati/pyth-evm-update-method (#209) 2022-05-16 13:44:43 +02:00
CONTRIBUTING.md Undocument Gerrit 2021-12-13 15:38:17 +01:00
DEVELOP.md P2W Focused README/DEVELOP.md (#220) 2022-05-23 08:48:34 +02:00
Dockerfile.client Abehjati/cleanup again (#215) 2022-05-20 12:43:31 +02:00
Dockerfile.guardian guardiand: Bump wormhole sources (#236) 2022-07-13 13:39:38 +02:00
Dockerfile.solana Bump Solana to v1.10.13, bump borsh to v0.9.3, bump clap to v3.18 (#210) 2022-05-17 08:53:30 +02:00
Dockerfile.terra Abehjati/cleanup again (#215) 2022-05-20 12:43:31 +02:00
Dockerfile.wasm fix: minor fixes to wasm and price dockerfiles (#197) 2022-05-03 13:41:36 +03:00
LICENSE staging/algorand: apply global Apache 2 license 2022-02-05 09:30:28 -05:00
README.md P2W Focused README/DEVELOP.md (#220) 2022-05-23 08:48:34 +02:00
SECURITY.md Add bug bounty and audits (#233) 2022-07-12 18:02:47 -04:00
Tiltfile Add pyth-evm-watcher to tilt (#238) 2022-07-15 17:37:58 +02:00
generate-abi.sh node: rename bridge/ to node/ 2021-08-26 11:36:36 +02:00

README.md

Pyth2Wormhole

This repository acts as a monorepo for the various components that make up Pyth2Wormhole. The base repository is a fork from Certus One's reference Wormhole implementation in order to take advantage of the existing tooling for building projects based on Wormhole's various SDKs. Much of the existing documentation from there will also apply to this repository.

Within this monorepo you will find the following subprojects:

Pyth2Wormhole Solana

solana/pyth2wormhole

The main Pyth implementation currently exists as an on-chain contract on Solana. In order to expose these prices cross-chain, the Pyth2Wormhole Solana contract acts as a sender for Pyth prices. At regular intervals the Pyth contract will observe the current Pyth price for selected products, and produce an attestation which is then relayed over Wormhole to be consumed by the various P2W receiver contracts.

Pyth2Wormhole Ethereum

ethereum/contracts/pyth

The Ethereum P2W contract acts as a receiver for Pyth prices relayed from the P2W Solana contract. It also provides a public API for other Ethereum contracts that can be used to consume Pyth prices. For a guide on using this API to consume Pyth price feeds see pyth-evm-sdk which contains documented examples.

Pyth2Wormhole Price Service

third_party/pyth

The P2W Price Service is an off-chain service which constantly observes the Wormhole network watching for price attestations emitted from the Pyth Solana contract. It exposes all observed attestations via a public API over HTTPS/WSS which can be consumed by client-side applications that wish to use Pyth pricing data.

For a guide on utilising this service in your project, see the documentation in the pyth-js repository.


See DEVELOP.md for instructions on how to set up a local devnet, and CONTRIBUTING.md for instructions on how to contribute to this project.

Audit / Feature Status

This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Or plainly spoken - this is a very complex piece of software which targets a bleeding-edge, experimental smart contract runtime. Mistakes happen, and no matter how hard you try and whether you pay someone to audit it, it may eat your tokens, set your printer on fire or startle your cat. Cryptocurrencies are a high-risk investment, no matter how fancy.