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

Jayant Krishnamurthy c0b801ef15 [doc] README updates (#637) 2 ani în urmă
.github 7c728a5718 Update Tiltfile for CI (#623) 2 ani în urmă
governance b9430aee81 [sdk] Add new SDK packages to lerna (#630) 2 ani în urmă
price_pusher b9430aee81 [sdk] Add new SDK packages to lerna (#630) 2 ani în urmă
price_service b9430aee81 [sdk] Add new SDK packages to lerna (#630) 2 ani în urmă
scripts 0df243ba9e [eth] Add benchmark tests (#368) 3 ani în urmă
target_chains b9430aee81 [sdk] Add new SDK packages to lerna (#630) 2 ani în urmă
third_party 1978d73b94 attester: Add an on-chain last attestation timestamp and rate limit arg (#622) 2 ani în urmă
tilt_devnet c0b801ef15 [doc] README updates (#637) 2 ani în urmă
tilt_modules d6e25d9209 Add pre-commit globally (#393) 3 ani în urmă
wormhole_attester 1978d73b94 attester: Add an on-chain last attestation timestamp and rate limit arg (#622) 2 ani în urmă
.dockerignore 78cd4ee437 pyth2wormhole: build + deploy program into local devnet 4 ani în urmă
.gitignore bbe10ba553 [sdk] Move JS sdks into this repo (#611) 2 ani în urmă
.pre-commit-config.yaml 70fd0a6c15 [wormhole-attester] Move p2w-sdk inside wormhole_attester directory (#534) 2 ani în urmă
LICENSE fedb92e446 Remove unused components/projects (#481) 2 ani în urmă
README.md c0b801ef15 [doc] README updates (#637) 2 ani în urmă
SECURITY.md eecebe86cc updatinbg SECURITY.md (#628) 2 ani în urmă
Tiltfile 7c728a5718 Update Tiltfile for CI (#623) 2 ani în urmă
lerna.json 4c5d0d5e1b [refactor] Add global lerna (#546) 2 ani în urmă
package-lock.json b9430aee81 [sdk] Add new SDK packages to lerna (#630) 2 ani în urmă
package.json b9430aee81 [sdk] Add new SDK packages to lerna (#630) 2 ani în urmă
rustfmt.toml becc216853 Abehjati/repo-improvement (#395) 3 ani în urmă
tsconfig.base.json 481c61bc2c [refactor] Improve typescript codebase (#553) 2 ani în urmă

README.md

Pyth Crosschain

This repository acts as a monorepo for the various components that make up Pyth Crosschain.

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

Target Chains

target_chains

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

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

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

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.

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.