Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 2.54 KB

aptos.md

File metadata and controls

38 lines (25 loc) · 2.54 KB
description
Consume Pyth Network prices in applications on Aptos

Pyth on Aptos

Aptos contracts can update and fetch the Pyth prices using the Pyth Aptos Contract, which has been deployed on Mainnet. The documented source code can be found here.

Updating Price Feeds

The mechanism by which price feeds are updated on Aptos is explained here. The pyth-aptos-js package can be used to fetch price feed update data which can be passed to the pyth::update_price on-chain function.

Examples

Networks

Pyth is currently deployed on Aptos Mainnet.

Addresses

When deploying contracts using Pyth, the named addresses pyth, wormhole and deployer need to be defined at compile time. These addresses are the same across both Testnet and Mainnet.

Named Address Value
pyth 0x7e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b387
wormhole 0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625
deployer 0xb31e712b26fd295357355f6845e77c888298636609e93bc9b05f0f604049f434

deployer and wormhole are implementation details of the Pyth contract: you will not need to interact with these.

Price Feeds

Network Available Price Feeds
Aptos Testnet https://pyth.network/developers/price-feed-ids#aptos-testnet
Aptos Mainnet https://pyth.network/developers/price-feed-ids#aptos-mainnet