pyth-crosschain/third_party/pyth/p2w-integration-observer
Stanisław Drozd a4c749b99c
pyth2wormhole: implement wire format v3rev0 (#189)
* pyth2wormhole: implement wire format v3rev0

commit-id:c106d3b3

* pyth.js: Run prettier formatting

commit-id:fc9fb160

* ethereum: Fix tab indentation in Pyth contracts

commit-id:3d2ab7d8

* p2w-terra contract: fix formatting

commit-id:685dd14f

* p2w-sdk: Use wasm in the JS package, detect bundler/node via `window`

This commit makes sure that our wasm usage is more robust. We ensure
that the JSON representation renders all important numbers in their
string decimal form. b

commit-id:75f9c224

* p2w-sdk: review suggestions: field ranems, limit serde attributes

commit-id:9f596b80

* p2w-sdk/rust: Remove utils.rs and the helper type

commit-id:e72c6345
2022-04-25 18:32:25 +02:00
..
src pyth2wormhole: implement wire format v3rev0 (#189) 2022-04-25 18:32:25 +02:00
.gitignore Merge Dev.v2 into main (#181) 2022-04-11 18:15:20 +02:00
Dockerfile Merge Dev.v2 into main (#181) 2022-04-11 18:15:20 +02:00
README.md Merge Dev.v2 into main (#181) 2022-04-11 18:15:20 +02:00
package-lock.json Merge Dev.v2 into main (#181) 2022-04-11 18:15:20 +02:00
package.json Merge Dev.v2 into main (#181) 2022-04-11 18:15:20 +02:00
tsconfig.json Merge Dev.v2 into main (#181) 2022-04-11 18:15:20 +02:00
tslint.json Merge Dev.v2 into main (#181) 2022-04-11 18:15:20 +02: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.