|
|
преди 1 година | |
|---|---|---|
| .. | ||
| example | 3e762aa985 [Near] Bump wormhole (#1239) | преди 1 година |
| receiver | b672613273 feat(target_chains/near): added batch price fetching functions (#1578) | преди 1 година |
| scripts | ef02cfefe4 docs(near): add near guides | преди 2 години |
| wormhole-stub | 3e762aa985 [Near] Bump wormhole (#1239) | преди 1 година |
| README.md | 7641f7eacf docs(near): improve example | преди 2 години |
| rust-toolchain.toml | 3e762aa985 [Near] Bump wormhole (#1239) | преди 1 година |
This directory contains the Pyth contract for NEAR, examples, and utilities to deploy. Within the example/
directory you will find an example skeleton NEAR contract that updates and uses several prices. You can find
payloads to test with from the Hermes API. Additionally see the scripts/update.sh script for an example
of how to manually submit a price update from the CLI.
Deploying the NEAR contract has three steps:
near generate-keyscripts/deploy.sh to deploy the contract. You can find a codehash by:
sha256sum pyth.wasm after building the contract.list(bytes.fromhex(hash)) in Python to get a byte array.codehash field in deploy.sh for the initial codehash.You can find more in-depth documentation on the Pyth Website for a more in-depth guide to working with Pyth concepts in general in the context of NEAR.