Selaa lähdekoodia

Make aptos abi backward compatible (#999)

In our previous release this function was an entry function by mistake.
Now in order to keep our abi backward compatible, we need to keep it as entry function.
In order to allow the newer aptos cli to ignore this issue, we decorate it with `legacy_entry_fun`
Mohammad Amin Khashkhashi Moghaddam 2 vuotta sitten
vanhempi
sitoutus
ce86586744
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      target_chains/aptos/contracts/sources/pyth.move

+ 2 - 1
target_chains/aptos/contracts/sources/pyth.move

@@ -323,6 +323,7 @@ module pyth::pyth {
         update_price_feeds_if_fresh(vaas, price_identifiers, publish_times, coins);
     }
 
+    #[legacy_entry_fun]
     /// Update the cached price feeds with the data in the given VAAs, using
     /// update_price_feeds(). However, this function will only have an effect if any of the
     /// prices in the update are fresh. The price_identifiers and publish_times parameters
@@ -332,7 +333,7 @@ module pyth::pyth {
     ///
     /// For a given price update i in the batch, that price is considered fresh if the current cached
     /// price for price_identifiers[i] is older than publish_times[i].
-    public fun update_price_feeds_if_fresh(
+    public entry fun update_price_feeds_if_fresh(
         vaas: vector<vector<u8>>,
         price_identifiers: vector<vector<u8>>,
         publish_times: vector<u64>,