소스 검색

Merge branch 'sui/hot_potato' of github.com:pyth-network/pyth-crosschain into sui/hot_potato

optke3 2 년 전
부모
커밋
e3a94bb86c
1개의 변경된 파일7개의 추가작업 그리고 10개의 파일을 삭제
  1. 7 10
      target_chains/sui/README.md

+ 7 - 10
target_chains/sui/README.md

@@ -6,15 +6,14 @@ Pyth price feeds on Sui are uniquely represented in the global store as `PriceIn
 
 `PriceInfoObject`s are central to Pyth on Sui, since they are in unique correspondence with each Pyth price feed and must be passed in to functions that act on price feeds, e.g.
 
-- `update_price_feeds`
-- `update_price_feed_from_single_vaa`
-- `update_price_feeds_if_fresh`
+- `update_single_price_feed`
+- `update_single_pric_feeds_if_fresh`
 
 ## 2. How to Update and Consume Price Feeds
 
 To update and then consume a price feed, one needs to build a Sui [programmable transaction](https://docs.sui.io/build/prog-trans-ts-sdk).
 
-As with other chains, one first obtains a batch price attestation VAA (of type `vector<u8>`) off-chain for a Price Info Object whose feed is to be used. Assume the ID is `PRICE_INFO_OBJECT_ID`. Then, chain together the following sequence of function calls to update a price feed.
+As with other chains, one first obtains a batch price attestation VAA (of type `vector<u8>`) off-chain for a Price Info Object whose feed is to be used. Then, chain together the following sequence of function calls to update a price feed.
 
 ### 1. `wormhole::wormhole::parse_and_verify`
 
@@ -28,7 +27,7 @@ public fun parse_and_verify(
   ): VAA
 ```
 ### 2. `pyth::pyth::update_single_price_feed`
-Use the verified VAA and create a hot potato containing price updates.
+Use the verified VAA and create a hot potato vector containing the latest price updates.
 ```Rust
 public fun create_price_infos_hot_potato(
         pyth_state: &PythState,
@@ -38,7 +37,7 @@ public fun create_price_infos_hot_potato(
 ```
 
 ### 3.`pyth::pyth::update_single_price_feed`
-Use the hot potato to update a price feed.
+Use the hot potato price updates vector to update a price feed.
 
 ```Rust
 public fun update_single_price_feed(
@@ -58,7 +57,7 @@ public fun destroy<T: copy + drop>(
 )
 ```
 
-### 5. `pyth::get_price`
+### 5. `pyth::pyth::get_price`
 Finally, get the price of the updated price feed in `PriceInfoObject` 🎉🎉🎉.
 ```Rust
 public fun get_price(
@@ -67,14 +66,12 @@ public fun get_price(
       clock: &Clock
 ): Price
 ```
-
-Fetch the price of the updated Price Info Object.
+This looks like a long sequence of calls to update a price feed, but programmable transactions make it easy. (See demos below).
 
 ## 3. Examples
 
 See the `./scripts` folder for examples of programmable transactions for creating price feeds and updating price feeds.
 - [Demo for updating a price feed](./scripts/pyth/update_price_feeds.ts)
-- [Demo for creating new price feeds](./scripts/pyth/create_all_price_feeds.ts)
 
 To build and test the contracts, run the following
 ```