Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 0 additions & 68 deletions CONTRIBUTING.md

This file was deleted.

56 changes: 21 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# 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.

[wormhole]: https://github.com/wormhole-foundation/wormhole
Pyth Crosschain.

Within this monorepo you will find the following subprojects:

Expand All @@ -15,8 +10,8 @@ Within this monorepo you will find the following subprojects:
> 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
Pythnet, a separate instance of the Solana blockchain. 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.
Expand All @@ -25,45 +20,28 @@ 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.
> target_chains

[pyth-sdk-solidity]: https://github.com/pyth-network/pyth-sdk-solidity
This directory contains on-chain contracts and SDKs for all of the various
blockchain runtimes that Pyth supports. Each subdirectory corresponds to a
blockchain runtime. Inside each subdirectory, there are subfolders for
contracts, SDKs, and 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
Wormhole network watching for price attestations emitted from the Pyth
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.

[pyth-js]: https://github.com/pyth-network/pyth-js

---
The `client` subdirectory provides an SDK for interacting with the price service.
However, most users will interact with the price service via a chain-specific SDK

See [DEVELOP.md](DEVELOP.md) for instructions on how to set up a local devnet, and
[CONTRIBUTING.md](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.
For a guide on utilising this service in your project, see the chain-specific SDK
and examples for your blockchain runtime in the `target_chains` directory.

## Development

Expand All @@ -80,3 +58,11 @@ The checks are also performed in the CI to ensure the code follows consistent fo
### Tilt CI

Integration tests run in Tilt (via the `tilt ci` command). The Tilt CI workflow requires approval from a member of the Pyth team. If you are a member, click on "Details" next to the "Workflow / ci-pyth-crosschain" check in a pull request, and then on the "Resume" button on the workflow page.

## 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.
11 changes: 7 additions & 4 deletions DEVELOP.md → tilt_devnet/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
# Developing the bridge
# Tilt Devnet

## Local Devnet
We use Tilt to run integration tests. These tests instantiate docker containers with all of the
various blockchains and services in order to verify that they interoperate correctly.

## Installation

The following dependencies are required for local development:

- [Go](https://golang.org/dl/) >= 1.17.5
- [Tilt](http://tilt.dev/) >= 0.20.8
- Any of the local Kubernetes clusters supported by Tilt.
We strongly recommend [minikube](https://kubernetes.io/docs/setup/learning-environment/minikube/) >=
v1.21.0 with the kvm2 driver.
v1.21.0 .
- Tilt will use Minikube's embedded Docker server. If Minikube is not used, a local instance of
[Docker](https://docs.docker.com/engine/install/) / moby-engine >= 19.03 is required.

See the [Tilt docs](https://docs.tilt.dev/install.html) docs on how to set up your local cluster -
it won't take more than a few minutes to set up! Example minikube invocation, adjust limits as needed:

minikube start --cpus=8 --memory=8G --disk-size=50G --driver=kvm2
minikube start --cpus=8 --memory=8G --disk-size=50G --driver=docker
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker driver works on virtual machines


npm wants to set up an insane number of inotify watches in the web container which may exceed kernel limits.
The minikube default is too low, adjust it like this:
Expand Down