Ali Behjati 8 сар өмнө
parent
commit
8b81142e05

+ 13 - 13
target_chains/sui/contracts/Move.lock

@@ -2,35 +2,35 @@
 
 [move]
 version = 0
-manifest_digest = "320300697C11C4D84BF6ED32C1DB48A4EE830B6B44F4DFDA4E89345875C5EA11"
+manifest_digest = "915D6459031D76A0618631BDF08328171A3494876C5E17735BCBFF462BEDF464"
 deps_digest = "3C4103934B1E040BB6B23F1D610B4EF9F2F1166A50A104EADCF77467C004C600"
 
 dependencies = [
-  { name = "Sui" },
+  { name = "Iota" },
   { name = "Wormhole" },
 ]
 
 [[move.package]]
-name = "MoveStdlib"
-source = { git = "https://github.com/MystenLabs/sui.git", rev = "041c5f2bae2fe52079e44b70514333532d69f4e6", subdir = "crates/sui-framework/packages/move-stdlib" }
-
-[[move.package]]
-name = "Sui"
-source = { git = "https://github.com/MystenLabs/sui.git", rev = "041c5f2bae2fe52079e44b70514333532d69f4e6", subdir = "crates/sui-framework/packages/sui-framework" }
+name = "Iota"
+source = { git = "https://github.com/iotaledger/iota.git", rev = "751c23caf24efd071463b9ffd07eabcb15f44f31", subdir = "crates/iota-framework/packages/iota-framework" }
 
 dependencies = [
   { name = "MoveStdlib" },
 ]
 
+[[move.package]]
+name = "MoveStdlib"
+source = { git = "https://github.com/iotaledger/iota.git", rev = "751c23caf24efd071463b9ffd07eabcb15f44f31", subdir = "crates/iota-framework/packages/move-stdlib" }
+
 [[move.package]]
 name = "Wormhole"
-source = { git = "https://github.com/wormhole-foundation/wormhole.git", rev = "82d82bffd5a8566e4b5d94be4e4678ad55ab1f4f", subdir = "sui/wormhole" }
+source = { local = "../vendor/wormhole_iota_testnet/wormhole" }
 
 dependencies = [
-  { name = "Sui" },
+  { name = "Iota" },
 ]
 
 [move.toolchain-version]
-compiler-version = "1.27.2"
-edition = "legacy"
-flavor = "sui"
+compiler-version = "0.9.2-rc"
+edition = "2024.beta"
+flavor = "iota"

+ 7 - 9
target_chains/sui/contracts/Move.toml

@@ -1,17 +1,15 @@
 [package]
 name = "Pyth"
 version = "0.0.2"
+published-at = "0x23994dd119480ea614f7623520337058dca913cb1bb6e5d8d51c7b067d3ca3bb"
 
-[dependencies.Sui]
-git = "https://github.com/MystenLabs/sui.git"
-subdir = "crates/sui-framework/packages/sui-framework"
-rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
+[dependencies.Iota]
+git = "https://github.com/iotaledger/iota.git"
+subdir = "crates/iota-framework/packages/iota-framework"
+rev = "751c23caf24efd071463b9ffd07eabcb15f44f31"
 
 [dependencies.Wormhole]
-git = "https://github.com/wormhole-foundation/wormhole.git"
-subdir = "sui/wormhole"
-rev = "82d82bffd5a8566e4b5d94be4e4678ad55ab1f4f"
+local = "../vendor/wormhole_iota_testnet/wormhole"
 
 [addresses]
-pyth = "0x00b53b0f4174108627fbee72e2498b58d6a2714cded53fac537034c220d26302"
-wormhole = "0x5306f64e312b581766351c07af79c72fcb1cd25147157fdc2f8ad76de9a3fb6a"
+pyth = "0x23994dd119480ea614f7623520337058dca913cb1bb6e5d8d51c7b067d3ca3bb"

+ 3 - 3
target_chains/sui/contracts/sources/batch_price_attestation.move

@@ -1,6 +1,6 @@
 module pyth::batch_price_attestation {
     use std::vector::{Self};
-    use sui::clock::{Self, Clock};
+    use iota::clock::{Self, Clock};
 
     use pyth::price_feed::{Self};
     use pyth::price_info::{Self, PriceInfo};
@@ -164,7 +164,7 @@ module pyth::batch_price_attestation {
     #[test]
     #[expected_failure]
     fun test_deserialize_batch_price_attestation_invalid_magic() {
-        use sui::test_scenario::{Self, ctx};
+        use iota::test_scenario::{Self, ctx};
         let test = test_scenario::begin(@0x1234);
         let test_clock = clock::create_for_testing(ctx(&mut test));
         // A batch price attestation with a magic number of 0x50325749
@@ -176,7 +176,7 @@ module pyth::batch_price_attestation {
 
     #[test]
     fun test_deserialize_batch_price_attestation() {
-        use sui::test_scenario::{Self, ctx};
+        use iota::test_scenario::{Self, ctx};
         // Set the arrival time
         let test = test_scenario::begin(@0x1234);
         let test_clock = clock::create_for_testing(ctx(&mut test));

+ 3 - 3
target_chains/sui/contracts/sources/data_source.move

@@ -1,7 +1,7 @@
 module pyth::data_source {
-    use sui::dynamic_field::{Self};
-    use sui::object::{UID};
-    use sui::tx_context::{TxContext};
+    use iota::dynamic_field::{Self};
+    use iota::object::{UID};
+    use iota::tx_context::{TxContext};
 
     use pyth::set::{Self};
 

+ 1 - 1
target_chains/sui/contracts/sources/event.move

@@ -1,5 +1,5 @@
 module pyth::event {
-    use sui::event::{Self};
+    use iota::event::{Self};
     use pyth::price_feed::{PriceFeed};
 
     friend pyth::pyth;

+ 6 - 6
target_chains/sui/contracts/sources/governance/contract_upgrade.move

@@ -8,9 +8,9 @@
 /// 3.  Upgrade.
 /// 4.  Commit upgrade.
 module pyth::contract_upgrade {
-    use sui::event::{Self};
-    use sui::object::{ID};
-    use sui::package::{UpgradeReceipt, UpgradeTicket};
+    use iota::event::{Self};
+    use iota::object::{ID};
+    use iota::package::{UpgradeReceipt, UpgradeTicket};
     use wormhole::bytes32::{Self, Bytes32};
     use wormhole::cursor::{Self};
 
@@ -38,9 +38,9 @@ module pyth::contract_upgrade {
     }
 
     /// Redeem governance VAA to issue an `UpgradeTicket` for the upgrade given
-    /// a contract upgrade VAA. This governance message is only relevant for Sui
+    /// a contract upgrade VAA. This governance message is only relevant for Iota
     /// because a contract upgrade is only relevant to one particular network
-    /// (in this case Sui), whose build digest is encoded in this message.
+    /// (in this case Iota), whose build digest is encoded in this message.
     public fun authorize_upgrade(
         pyth_state: &mut State,
         receipt: WormholeVAAVerificationReceipt,
@@ -86,7 +86,7 @@ module pyth::contract_upgrade {
 
     /// Finalize the upgrade that ran to produce the given `receipt`. This
     /// method invokes `state::commit_upgrade` which interacts with
-    /// `sui::package`.
+    /// `iota::package`.
     public fun commit_upgrade(
         self: &mut State,
         receipt: UpgradeReceipt,

+ 2 - 2
target_chains/sui/contracts/sources/governance/set_data_sources.move

@@ -49,8 +49,8 @@ module pyth::set_data_sources {
 
 #[test_only]
 module pyth::set_data_sources_tests {
-    use sui::test_scenario::{Self};
-    use sui::coin::Self;
+    use iota::test_scenario::{Self};
+    use iota::coin::Self;
 
     use wormhole::external_address::{Self};
     use wormhole::bytes32::{Self};

+ 2 - 2
target_chains/sui/contracts/sources/governance/set_stale_price_threshold.move

@@ -27,8 +27,8 @@ module pyth::set_stale_price_threshold {
 
 #[test_only]
 module pyth::set_stale_price_threshold_test {
-    use sui::test_scenario::{Self};
-    use sui::coin::Self;
+    use iota::test_scenario::{Self};
+    use iota::coin::Self;
 
     use pyth::pyth_tests::{Self, setup_test, take_wormhole_and_pyth_states};
     use pyth::state::Self;

+ 4 - 4
target_chains/sui/contracts/sources/governance/set_update_fee.move

@@ -1,5 +1,5 @@
 module pyth::set_update_fee {
-    use sui::math::{Self};
+    use std::u64;
 
     use wormhole::cursor;
 
@@ -34,14 +34,14 @@ module pyth::set_update_fee {
     }
 
     fun apply_exponent(mantissa: u64, exponent: u8): u64 {
-        mantissa * math::pow(10, exponent)
+        mantissa * u64::pow(10, exponent)
     }
 }
 
 #[test_only]
 module pyth::set_update_fee_tests {
-    use sui::test_scenario::{Self};
-    use sui::coin::Self;
+    use iota::test_scenario::{Self};
+    use iota::coin::Self;
 
     use pyth::pyth_tests::{Self, setup_test, take_wormhole_and_pyth_states};
     use pyth::state::Self;

+ 3 - 3
target_chains/sui/contracts/sources/merkle_tree.move

@@ -2,7 +2,7 @@
 // with a given depth, as well as proving that a leaf node belongs to the tree.
 module pyth::merkle_tree {
     use std::vector::{Self};
-    use sui::hash::{keccak256};
+    use iota::hash::{keccak256};
     use wormhole::bytes20::{Self, Bytes20, data};
     use wormhole::cursor::Cursor;
     use pyth::deserialize::{Self};
@@ -89,9 +89,9 @@ module pyth::merkle_tree {
         false
     }
 
-    // The Sui Move stdlb insert function shifts v[i] and subsequent elements to the right.
+    // The Iota Move stdlb insert function shifts v[i] and subsequent elements to the right.
     // We don't want this behavior, so we define our own set_element function that instead replaces the ith element.
-    // Reference: https://github.com/MystenLabs/sui/blob/main/crates/sui-framework/packages/move-stdlib/sources/vector.move
+    // Reference: https://github.com/MystenLabs/iota/blob/main/crates/iota-framework/packages/move-stdlib/sources/vector.move
     fun set_element<T: drop>(a: &mut vector<T>, value: T, index: u64){
         vector::push_back<T>(a, value); // push value to end
         vector::swap_remove(a, index); // swap value to correct position and pop last value

+ 2 - 2
target_chains/sui/contracts/sources/migrate.move

@@ -11,7 +11,7 @@
 /// any of Pyth's methods by enforcing the current build version as
 /// their required minimum version.
 module pyth::migrate {
-    use sui::object::{ID};
+    use iota::object::{ID};
 
     use pyth::state::{Self, State};
     use pyth::contract_upgrade::{Self};
@@ -67,7 +67,7 @@ module pyth::migrate {
 
         // Finally emit an event reflecting a successful migrate.
         let package = state::current_package(&latest_only, pyth_state);
-        sui::event::emit(MigrateComplete { package });
+        iota::event::emit(MigrateComplete { package });
     }
 
     #[test_only]

+ 15 - 15
target_chains/sui/contracts/sources/price_info.move

@@ -1,10 +1,10 @@
 module pyth::price_info {
-    use sui::object::{Self, UID, ID};
-    use sui::tx_context::{TxContext};
-    use sui::dynamic_object_field::{Self};
-    use sui::table::{Self};
-    use sui::coin::{Self, Coin};
-    use sui::sui::SUI;
+    use iota::object::{Self, UID, ID};
+    use iota::tx_context::{TxContext};
+    use iota::dynamic_object_field::{Self};
+    use iota::table::{Self};
+    use iota::coin::{Self, Coin};
+    use iota::iota::IOTA;
 
     use pyth::price_feed::{Self, PriceFeed};
     use pyth::price_identifier::{PriceIdentifier};
@@ -18,7 +18,7 @@ module pyth::price_info {
     friend pyth::pyth;
     friend pyth::state;
 
-    /// Sui object version of PriceInfo.
+    /// Iota object version of PriceInfo.
     /// Has a key ability, is unique for each price identifier, and lives in global store.
     struct PriceInfoObject has key, store {
         id: UID,
@@ -33,7 +33,7 @@ module pyth::price_info {
     }
 
     /// Creates a table which maps a PriceIdentifier to the
-    /// UID (in bytes) of the corresponding Sui PriceInfoObject.
+    /// UID (in bytes) of the corresponding Iota PriceInfoObject.
     public(friend) fun new_price_info_registry(parent_id: &mut UID, ctx: &mut TxContext) {
         assert!(
             !dynamic_object_field::exists_(parent_id, KEY),
@@ -95,19 +95,19 @@ module pyth::price_info {
     }
 
     public fun get_balance(price_info_object: &PriceInfoObject): u64 {
-        if (!dynamic_object_field::exists_with_type<vector<u8>, Coin<SUI>>(&price_info_object.id, FEE_STORAGE_KEY)) {
+        if (!dynamic_object_field::exists_with_type<vector<u8>, Coin<IOTA>>(&price_info_object.id, FEE_STORAGE_KEY)) {
             return 0
         };
-        let fee = dynamic_object_field::borrow<vector<u8>, Coin<SUI>>(&price_info_object.id, FEE_STORAGE_KEY);
+        let fee = dynamic_object_field::borrow<vector<u8>, Coin<IOTA>>(&price_info_object.id, FEE_STORAGE_KEY);
         coin::value(fee)
     }
 
-    public fun deposit_fee_coins(price_info_object: &mut PriceInfoObject, fee_coins: Coin<SUI>) {
-        if (!dynamic_object_field::exists_with_type<vector<u8>, Coin<SUI>>(&price_info_object.id, FEE_STORAGE_KEY)) {
+    public fun deposit_fee_coins(price_info_object: &mut PriceInfoObject, fee_coins: Coin<IOTA>) {
+        if (!dynamic_object_field::exists_with_type<vector<u8>, Coin<IOTA>>(&price_info_object.id, FEE_STORAGE_KEY)) {
             dynamic_object_field::add(&mut price_info_object.id, FEE_STORAGE_KEY, fee_coins);
         }
         else {
-            let current_fee = dynamic_object_field::borrow_mut<vector<u8>, Coin<SUI>>(
+            let current_fee = dynamic_object_field::borrow_mut<vector<u8>, Coin<IOTA>>(
                 &mut price_info_object.id,
                 FEE_STORAGE_KEY
             );
@@ -139,8 +139,8 @@ module pyth::price_info {
 
     #[test]
     public fun test_get_price_info_object_id_from_price_identifier(){
-        use sui::object::{Self};
-        use sui::test_scenario::{Self, ctx};
+        use iota::object::{Self};
+        use iota::test_scenario::{Self, ctx};
         use pyth::price_identifier::{Self};
         let scenario = test_scenario::begin(@pyth);
         let uid = object::new(ctx(&mut scenario));

+ 39 - 39
target_chains/sui/contracts/sources/pyth.move

@@ -1,11 +1,11 @@
 module pyth::pyth {
     use std::vector;
-    use sui::tx_context::{TxContext};
-    use sui::coin::{Self, Coin};
-    use sui::sui::{SUI};
-    use sui::transfer::{Self};
-    use sui::clock::{Self, Clock};
-    use sui::package::{UpgradeCap};
+    use iota::tx_context::{TxContext};
+    use iota::coin::{Self, Coin};
+    use iota::iota::{IOTA};
+    use iota::transfer::{Self};
+    use iota::clock::{Self, Clock};
+    use iota::package::{UpgradeCap};
 
     use pyth::event::{Self as pyth_event};
     use pyth::data_source::{Self, DataSource};
@@ -166,7 +166,7 @@ module pyth::pyth {
         while (!vector::is_empty(&price_infos)){
             let cur_price_info = vector::pop_back(&mut price_infos);
 
-            // Only create new Sui PriceInfoObject if not already
+            // Only create new Iota PriceInfoObject if not already
             // registered with the Pyth State object.
             if (!state::price_feed_object_exists(
                     pyth_state,
@@ -175,7 +175,7 @@ module pyth::pyth {
                         )
                     )
             ){
-                // Create and share newly created Sui PriceInfoObject containing a price feed,
+                // Create and share newly created Iota PriceInfoObject containing a price feed,
                 // and then register a copy of its ID with State.
                 let new_price_info_object = price_info::new_price_info_object(cur_price_info, ctx);
                 let price_identifier = price_info::get_price_identifier(&cur_price_info);
@@ -263,12 +263,12 @@ module pyth::pyth {
         pyth_state: &PythState,
         price_updates: HotPotatoVector<PriceInfo>,
         price_info_object: &mut PriceInfoObject,
-        fee: Coin<SUI>,
+        fee: Coin<IOTA>,
         clock: &Clock
     ): HotPotatoVector<PriceInfo> {
         let latest_only = state::assert_latest_only(pyth_state);
 
-        // On Sui, users get to choose which price feeds to update. They specify a single price feed to
+        // On Iota, users get to choose which price feeds to update. They specify a single price feed to
         // update at a time. We therefore charge the base fee for each such individual update.
         // This is a departure from Eth, where users don't get to necessarily choose.
         assert!(state::get_base_update_fee(pyth_state) <= coin::value(&fee), E_INSUFFICIENT_FEE);
@@ -359,7 +359,7 @@ module pyth::pyth {
     /// get_price() is likely to abort unless you call update_price_feeds() to update the cached price
     /// beforehand, as the cached prices may be older than the stale price threshold.
     ///
-    /// The price_info_object is a Sui object with the key ability that uniquely
+    /// The price_info_object is a Iota object with the key ability that uniquely
     /// contains a price feed for a given price_identifier.
     ///
     public fun get_price(state: &PythState, price_info_object: &PriceInfoObject, clock: &Clock): Price {
@@ -419,12 +419,12 @@ module pyth::pyth {
 module pyth::pyth_tests{
     use std::vector::{Self};
 
-    use sui::sui::SUI;
-    use sui::coin::{Self, Coin};
-    use sui::test_scenario::{Self, Scenario, ctx, take_shared, return_shared};
-    use sui::package::Self;
-    use sui::object::{Self, ID};
-    use sui::clock::{Self, Clock};
+    use iota::iota::IOTA;
+    use iota::coin::{Self, Coin};
+    use iota::test_scenario::{Self, Scenario, ctx, take_shared, return_shared};
+    use iota::package::Self;
+    use iota::object::{Self, ID};
+    use iota::clock::{Self, Clock};
 
     use pyth::state::{State as PythState};
     use pyth::setup::{Self};
@@ -501,8 +501,8 @@ module pyth::pyth_tests{
     #[test_only]
     /// Init Wormhole core bridge state.
     /// Init Pyth state.
-    /// Set initial Sui clock time.
-    /// Mint some SUI fee coins.
+    /// Set initial Iota clock time.
+    /// Mint some IOTA fee coins.
     public fun setup_test(
         stale_price_threshold: u64,
         governance_emitter_chain_id: u64,
@@ -511,7 +511,7 @@ module pyth::pyth_tests{
         initial_guardians: vector<vector<u8>>,
         base_update_fee: u64,
         to_mint: u64
-    ): (Scenario, Coin<SUI>, Clock) {
+    ): (Scenario, Coin<IOTA>, Clock) {
 
         let scenario = test_scenario::begin(DEPLOYER);
 
@@ -576,7 +576,7 @@ module pyth::pyth_tests{
             ctx(&mut scenario)
         );
 
-        let coins = coin::mint_for_testing<SUI>(to_mint, ctx(&mut scenario));
+        let coins = coin::mint_for_testing<IOTA>(to_mint, ctx(&mut scenario));
         let clock = clock::create_for_testing(ctx(&mut scenario));
         (scenario, coins, clock)
     }
@@ -673,7 +673,7 @@ module pyth::pyth_tests{
         assert!(pyth::get_total_update_fee(&pyth_state, vector::length<vector<u8>>(&multiple_vaas)) == 5*DEFAULT_BASE_UPDATE_FEE, 1);
 
         return_shared(pyth_state);
-        coin::burn_for_testing<SUI>(test_coins);
+        coin::burn_for_testing<IOTA>(test_coins);
         clock::destroy_for_testing(_clock);
         test_scenario::end(scenario);
     }
@@ -699,7 +699,7 @@ module pyth::pyth_tests{
         );
 
         cleanup_worm_state_pyth_state_and_clock(worm_state, pyth_state, clock);
-        coin::burn_for_testing<SUI>(test_coins);
+        coin::burn_for_testing<IOTA>(test_coins);
         test_scenario::end(scenario);
     }
 
@@ -730,7 +730,7 @@ module pyth::pyth_tests{
         );
 
         cleanup_worm_state_pyth_state_and_clock(worm_state, pyth_state, clock);
-        coin::burn_for_testing<SUI>(test_coins);
+        coin::burn_for_testing<IOTA>(test_coins);
         test_scenario::end(scenario);
     }
 
@@ -779,7 +779,7 @@ module pyth::pyth_tests{
         let price_info_object_3 = take_shared<PriceInfoObject>(&scenario);
         let price_info_object_4 = take_shared<PriceInfoObject>(&scenario);
 
-        // Create vector of price info objects (Sui objects with key ability and living in global store),
+        // Create vector of price info objects (Iota objects with key ability and living in global store),
         // which contain the price feeds we want to update. Note that these can be passed into
         // update_price_feeds in any order!
         //let price_info_object_vec = vector[price_info_object_1, price_info_object_2, price_info_object_3, price_info_object_4];
@@ -930,7 +930,7 @@ module pyth::pyth_tests{
 
         // clean up test scenario
         test_scenario::next_tx(&mut scenario, DEPLOYER);
-        coin::burn_for_testing<SUI>(coins);
+        coin::burn_for_testing<IOTA>(coins);
 
         cleanup_worm_state_pyth_state_and_clock(worm_state, pyth_state, clock);
         test_scenario::end(scenario);
@@ -963,7 +963,7 @@ module pyth::pyth_tests{
 
         // clean up test scenario
         test_scenario::next_tx(&mut scenario, DEPLOYER);
-        coin::burn_for_testing<SUI>(coins);
+        coin::burn_for_testing<IOTA>(coins);
 
         cleanup_worm_state_pyth_state_and_clock(worm_state, pyth_state, clock);
         test_scenario::end(scenario);
@@ -996,7 +996,7 @@ module pyth::pyth_tests{
 
         // clean up test scenario
         test_scenario::next_tx(&mut scenario, DEPLOYER);
-        coin::burn_for_testing<SUI>(coins);
+        coin::burn_for_testing<IOTA>(coins);
 
         cleanup_worm_state_pyth_state_and_clock(worm_state, pyth_state, clock);
         test_scenario::end(scenario);
@@ -1029,7 +1029,7 @@ module pyth::pyth_tests{
 
         // clean up test scenario
         test_scenario::next_tx(&mut scenario, DEPLOYER);
-        coin::burn_for_testing<SUI>(coins);
+        coin::burn_for_testing<IOTA>(coins);
 
         cleanup_worm_state_pyth_state_and_clock(worm_state, pyth_state, clock);
         test_scenario::end(scenario);
@@ -1072,7 +1072,7 @@ module pyth::pyth_tests{
 
         // clean up test scenario
         test_scenario::next_tx(&mut scenario, DEPLOYER);
-        coin::burn_for_testing<SUI>(coins);
+        coin::burn_for_testing<IOTA>(coins);
 
         cleanup_worm_state_pyth_state_and_clock(worm_state, pyth_state, clock);
         test_scenario::end(scenario);
@@ -1110,7 +1110,7 @@ module pyth::pyth_tests{
 
     #[test]
     fun test_create_and_update_multiple_price_feeds_with_accumulator_success() {
-        use sui::coin::Self;
+        use iota::coin::Self;
 
         let (scenario, coins, clock) = setup_test(500, 23, ACCUMULATOR_TESTS_EMITTER_ADDRESS, ACCUMULATOR_TESTS_DATA_SOURCE(), ACCUMULATOR_TESTS_INITIAL_GUARDIANS, DEFAULT_BASE_UPDATE_FEE, DEFAULT_COIN_TO_MINT);
 
@@ -1165,7 +1165,7 @@ module pyth::pyth_tests{
             return_shared(price_info_object);
             idx = idx + 1;
         };
-        coin::burn_for_testing<SUI>(coins);
+        coin::burn_for_testing<IOTA>(coins);
 
         // clean up test scenario
         test_scenario::next_tx(&mut scenario, DEPLOYER);
@@ -1211,7 +1211,7 @@ module pyth::pyth_tests{
         let price_info_object_3 = take_shared<PriceInfoObject>(&scenario);
         let price_info_object_4 = take_shared<PriceInfoObject>(&scenario);
 
-        // Create vector of price info objects (Sui objects with key ability and living in global store),
+        // Create vector of price info objects (Iota objects with key ability and living in global store),
         // which contain the price feeds we want to update. Note that these can be passed into
         // update_price_feeds in any order!
         //let price_info_object_vec = vector[price_info_object_1, price_info_object_2, price_info_object_3, price_info_object_4];
@@ -1300,7 +1300,7 @@ module pyth::pyth_tests{
         return_shared(price_info_object_2);
         return_shared(price_info_object_3);
         return_shared(price_info_object_4);
-        coin::burn_for_testing<SUI>(test_coins);
+        coin::burn_for_testing<IOTA>(test_coins);
 
         cleanup_worm_state_pyth_state_and_clock(worm_state, pyth_state, clock);
         test_scenario::end(scenario);
@@ -1395,7 +1395,7 @@ module pyth::pyth_tests{
         return_shared(price_info_object_3);
         return_shared(price_info_object_4);
 
-        coin::burn_for_testing<SUI>(test_coins);
+        coin::burn_for_testing<IOTA>(test_coins);
         cleanup_worm_state_pyth_state_and_clock(worm_state, pyth_state, clock);
         test_scenario::end(scenario);
     }
@@ -1403,8 +1403,8 @@ module pyth::pyth_tests{
     // pyth accumulator tests (included in this file instead of pyth_accumulator.move to avoid dependency cycle - as we need pyth_tests::setup_test)
     #[test]
     fun test_parse_and_verify_accumulator_updates(){
-        use sui::test_scenario::{Self, take_shared, return_shared};
-        use sui::transfer::{Self};
+        use iota::test_scenario::{Self, take_shared, return_shared};
+        use iota::transfer::{Self};
 
         let (scenario, coins, clock) = setup_test(500, 23, ACCUMULATOR_TESTS_EMITTER_ADDRESS, vector[], ACCUMULATOR_TESTS_INITIAL_GUARDIANS, 50, 0);
         let worm_state = take_shared<WormState>(&scenario);
@@ -1434,8 +1434,8 @@ module pyth::pyth_tests{
 
     #[test]
     fun test_parse_and_verify_accumulator_updates_with_extra_bytes_at_end_of_message(){
-        use sui::test_scenario::{Self, take_shared, return_shared};
-        use sui::transfer::{Self};
+        use iota::test_scenario::{Self, take_shared, return_shared};
+        use iota::transfer::{Self};
 
         let (scenario, coins, clock) = setup_test(500, 23, ACCUMULATOR_TESTS_EMITTER_ADDRESS, vector[], ACCUMULATOR_TESTS_INITIAL_GUARDIANS, 50, 0);
         let worm_state = take_shared<WormState>(&scenario);

+ 1 - 1
target_chains/sui/contracts/sources/pyth_accumulator.move

@@ -1,6 +1,6 @@
 module pyth::accumulator {
     use std::vector::{Self};
-    use sui::clock::{Clock, Self};
+    use iota::clock::{Clock, Self};
     use wormhole::bytes20::{Self, Bytes20};
     use wormhole::cursor::{Self, Cursor};
     use pyth::deserialize::{Self};

+ 2 - 2
target_chains/sui/contracts/sources/set.move

@@ -1,7 +1,7 @@
 /// A set data structure.
 module pyth::set {
-    use sui::table::{Self, Table};
-    use sui::tx_context::{TxContext};
+    use iota::table::{Self, Table};
+    use iota::tx_context::{TxContext};
     use std::vector;
 
     /// Empty struct. Used as the value type in mappings to encode a set

+ 5 - 5
target_chains/sui/contracts/sources/setup.move

@@ -1,8 +1,8 @@
 module pyth::setup {
-    use sui::object::{Self, UID};
-    use sui::package::{Self, UpgradeCap};
-    use sui::transfer::{Self};
-    use sui::tx_context::{Self, TxContext};
+    use iota::object::{Self, UID};
+    use iota::package::{Self, UpgradeCap};
+    use iota::transfer::{Self};
+    use iota::tx_context::{Self, TxContext};
 
     use pyth::state::{Self};
     use pyth::data_source::{DataSource};
@@ -34,7 +34,7 @@ module pyth::setup {
         // This will be created and sent to the transaction sender
         // automatically when the contract is published.
         transfer::public_transfer(
-            sui::package::test_publish(object::id_from_address(@pyth), ctx),
+            iota::package::test_publish(object::id_from_address(@pyth), ctx),
             tx_context::sender(ctx)
         );
     }

+ 6 - 6
target_chains/sui/contracts/sources/state.move

@@ -1,8 +1,8 @@
 module pyth::state {
     use std::vector;
-    use sui::object::{Self, UID, ID};
-    use sui::tx_context::{Self, TxContext};
-    use sui::package::{UpgradeCap, UpgradeTicket, UpgradeReceipt};
+    use iota::object::{Self, UID, ID};
+    use iota::tx_context::{Self, TxContext};
+    use iota::package::{UpgradeCap, UpgradeTicket, UpgradeReceipt};
 
     use pyth::data_source::{Self, DataSource};
     use pyth::price_info::{Self};
@@ -280,7 +280,7 @@ module pyth::state {
 
     /// Issue an `UpgradeTicket` for the upgrade.
     ///
-    /// NOTE: The Sui VM performs a check that this method is executed from the
+    /// NOTE: The Iota VM performs a check that this method is executed from the
     /// latest published package. If someone were to try to execute this using
     /// a stale build, the transaction will revert with `PackageUpgradeError`,
     /// specifically `PackageIDDoesNotMatch`.
@@ -294,7 +294,7 @@ module pyth::state {
 
     /// Finalize the upgrade that ran to produce the given `receipt`.
     ///
-    /// NOTE: The Sui VM performs a check that this method is executed from the
+    /// NOTE: The Iota VM performs a check that this method is executed from the
     /// latest published package. If someone were to try to execute this using
     /// a stale build, the transaction will revert with `PackageUpgradeError`,
     /// specifically `PackageIDDoesNotMatch`.
@@ -362,7 +362,7 @@ module pyth::state {
         // Add back in old dynamic field(s)...
 
         // Add dummy hash since this is the first time the package is published.
-        sui::dynamic_field::add(&mut self.id, CurrentDigest {}, bytes32::from_bytes(b"new build"));
+        iota::dynamic_field::add(&mut self.id, CurrentDigest {}, bytes32::from_bytes(b"new build"));
     }
 
     #[test_only]