pyth-crosschain/third_party/pyth/p2w-integration-observer
Ali Behjati 60113cdac9
Move p2w relayer parsing to p2w sdk js (#162)
* Move Price Attestation parsing logic to the sdk
2022-04-06 17:15:42 +02:00
..
src Move p2w relayer parsing to p2w sdk js (#162) 2022-04-06 17:15:42 +02:00
.gitignore Remove dependency to wormhole sdk as path and cleanup wrong eth copies (#104) 2022-03-23 10:00:09 +01:00
Dockerfile Remove dependency to wormhole sdk as path and cleanup wrong eth copies (#104) 2022-03-23 10:00:09 +01:00
README.md Remove dependency to wormhole sdk as path and cleanup wrong eth copies (#104) 2022-03-23 10:00:09 +01:00
package-lock.json Remove dependency to wormhole sdk as path and cleanup wrong eth copies (#104) 2022-03-23 10:00:09 +01:00
package.json Remove dependency to wormhole sdk as path and cleanup wrong eth copies (#104) 2022-03-23 10:00:09 +01:00
tsconfig.json Remove dependency to wormhole sdk as path and cleanup wrong eth copies (#104) 2022-03-23 10:00:09 +01:00
tslint.json Remove dependency to wormhole sdk as path and cleanup wrong eth copies (#104) 2022-03-23 10:00:09 +01:00

README.md

Pyth2wormhole relay example

IMPORTANT: This is not ready for production.

This package is an example Pyth2wormhole relayer implementation. The main focus is to provide an automated integration test that will perform last-mile delivery of Pyth2wormhole price attestations.

How it works

Relayer recap

When attesting with Wormhole, the final step consists of a query for the guardian-signed attestation data on the guardian public RPC, followed by posting the data to each desired target chain contract. Each target chain contract lets callers verify the payload's signatures, thus proving its validity. This activity means being a Wormhole relayer.

How this package relays attestations

p2w-integration-observer is a Node.js relayer script targeting ETH that will periodically query its source-chain counterpart for new sequence numbers to query from the guardians. Any pending sequence numbers will stick around in a global state until their corresponding messages are successfully retrieved from the guardians. Later, target chain calls are made and a given seqno is deleted from the pool. Failed target chain calls will not be retried.