Mirroring https://github.com/pyth-network/pyth-crosschain

Ali Behjati 70fd0a6c15 [wormhole-attester] Move p2w-sdk inside wormhole_attester directory (#534) 2 anni fa
.github 70fd0a6c15 [wormhole-attester] Move p2w-sdk inside wormhole_attester directory (#534) 2 anni fa
governance 16b7977179 sort symbols (#529) 2 anni fa
price_service 70fd0a6c15 [wormhole-attester] Move p2w-sdk inside wormhole_attester directory (#534) 2 anni fa
scripts 0df243ba9e [eth] Add benchmark tests (#368) 3 anni fa
target-chains 3af759b790 [eth] Add token swap example application (#518) 2 anni fa
target_chains 70fd0a6c15 [wormhole-attester] Move p2w-sdk inside wormhole_attester directory (#534) 2 anni fa
third_party 70fd0a6c15 [wormhole-attester] Move p2w-sdk inside wormhole_attester directory (#534) 2 anni fa
tilt_devnet 70fd0a6c15 [wormhole-attester] Move p2w-sdk inside wormhole_attester directory (#534) 2 anni fa
tilt_modules d6e25d9209 Add pre-commit globally (#393) 3 anni fa
wormhole_attester 70fd0a6c15 [wormhole-attester] Move p2w-sdk inside wormhole_attester directory (#534) 2 anni fa
.dockerignore 78cd4ee437 pyth2wormhole: build + deploy program into local devnet 4 anni fa
.gitignore 51080bcf5f Pyth Aptos Target Chain Contract (#291) 3 anni fa
.pre-commit-config.yaml 70fd0a6c15 [wormhole-attester] Move p2w-sdk inside wormhole_attester directory (#534) 2 anni fa
CONTRIBUTING.md d6e25d9209 Add pre-commit globally (#393) 3 anni fa
DEVELOP.md d6e25d9209 Add pre-commit globally (#393) 3 anni fa
LICENSE fedb92e446 Remove unused components/projects (#481) 2 anni fa
README.md 084acdb57e [refactor] Convert hyphen to underscore in the directory tree (#524) 2 anni fa
SECURITY.md ad2d1ebc51 updating security.md (#517) 2 anni fa
Tiltfile b4cf527f00 [price-service] Add price service client and sdk to this repo (#525) 2 anni fa
package-lock.json 88d8039c36 [xc-admin] add feature to send proposal to update permissions (#498) 2 anni fa
rustfmt.toml becc216853 Abehjati/repo-improvement (#395) 3 anni fa

README.md

Pyth Crosschain

This repository acts as a monorepo for the various components that make up Pyth Crosschain. 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:

Wormhole Attester

wormhole_attester

The main Pyth implementation currently exists as an on-chain contract on Solana. In order to expose these prices cross-chain, the Wormhole Attester 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 receiver contracts.

Target Chains

Ethereum

target_chains/ethereum/contracts/pyth

The Ethereum contract acts as a receiver for Pyth prices relayed from the Wormhole Attester. 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-sdk-solidity which contains documented examples.

Price Service

price_service

The 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.

Development

Releases

We use Semantic Versioning for our releases.

pre-commit hooks

pre-commit is a tool that checks and fixes simple issues (formatting, ...) before each commit. You can install it by following their website. In order to enable checks for this repo run pre-commit install from command-line in the root of this repo.

The checks are also performed in the CI to ensure the code follows consistent formatting.