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

Guillermo Bescos Alapont 7e2b5cc279 Refactor 2 ani în urmă
.github 097943f657 [xc-admin] Add encoder for governance messages (#462) 2 ani în urmă
pythnet 15708d552d Fix formatting for new nightly rust (#415) 3 ani în urmă
scripts 0df243ba9e [eth] Add benchmark tests (#368) 3 ani în urmă
target-chains e169da0a93 [cosmwasm] Deploy tool: Add new commands (update contract admin + get contract info) (#473) 2 ani în urmă
third_party fedb92e446 Remove unused components/projects (#481) 2 ani în urmă
tilt-devnet fedb92e446 Remove unused components/projects (#481) 2 ani în urmă
tilt_modules d6e25d9209 Add pre-commit globally (#393) 3 ani în urmă
wormhole-attester e12567c544 Move rust-toolchain (#460) 2 ani în urmă
xc-admin 7e2b5cc279 Refactor 2 ani în urmă
.dockerignore 78cd4ee437 pyth2wormhole: build + deploy program into local devnet 4 ani în urmă
.gitignore 51080bcf5f Pyth Aptos Target Chain Contract (#291) 3 ani în urmă
.pre-commit-config.yaml 80fe230563 Xc admin/add executor (#466) 2 ani în urmă
CONTRIBUTING.md d6e25d9209 Add pre-commit globally (#393) 3 ani în urmă
DEVELOP.md d6e25d9209 Add pre-commit globally (#393) 3 ani în urmă
LICENSE fedb92e446 Remove unused components/projects (#481) 2 ani în urmă
README.md d6e25d9209 Add pre-commit globally (#393) 3 ani în urmă
SECURITY.md d6e25d9209 Add pre-commit globally (#393) 3 ani în urmă
Tiltfile fedb92e446 Remove unused components/projects (#481) 2 ani în urmă
rustfmt.toml becc216853 Abehjati/repo-improvement (#395) 3 ani în urmă

README.md

Pyth2Wormhole

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

Pyth2Wormhole Solana

solana/pyth2wormhole

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

Pyth2Wormhole Ethereum

ethereum/contracts/pyth

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

Pyth2Wormhole Price Service

third_party/pyth

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