Skip to content

Conversation

@optke3
Copy link
Contributor

@optke3 optke3 commented Mar 19, 2023

Summary

Start simple and migrate the Aptos-Pyth Move modules that have few or no dependencies, or in other words the leaves of the dependency tree. These modules define structs or static data structures and the operations on them.

  • data_source.move
  • price.move
  • price_feed.move
  • price_identifier.move
  • price_info.move
  • price_status.move
  • deserialize.move (working with bytes)
  • i64.move (positive/negative integers)

Changes and Updates

  • Set up sui/contracts folder with a Makefile
  • Add a Move.toml file with the proper Sui Wormhole dependency, specifically the sui/wormhole-cleanup branch, which has the most up-to-date core bridge code.
  • Change deserialize.move to use the new WH bytes.move module, update deserialize_u32 to return Sui-native u32, and use casting to u64 in deserialize_i32
  • Disable error codes throughout these files.

TODOs

  • errors.move (redefine error codes, because they are done differently in Sui compared to Aptos)
  • batch_price_attestation.move
  • governance (many related modules)
  • state.move (represent global configs)
  • pyth.move (contains init functions and price feed update functions)
  • contract upgrade functionality
  • make price_feed individual Sui shared objects

Testing

sui move test or make test

Misc

Sui Version use for testing: sui 0.27.1-157ac7203

@vercel
Copy link

vercel bot commented Mar 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
example-oracle-amm 🔄 Building (Inspect) Mar 20, 2023 at 3:47PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
xc-admin-frontend ⬜️ Ignored (Inspect) Mar 20, 2023 at 3:47PM (UTC)

@optke3 optke3 changed the title sui: integration start, Move.toml, copy over some files from Pyth-Aptos contracts sui: integration start, Move.toml, copy some files from Pyth-Aptos contracts Mar 19, 2023
@optke3 optke3 marked this pull request as draft March 19, 2023 00:15
@optke3 optke3 self-assigned this Mar 19, 2023
@Reisen Reisen self-requested a review March 19, 2023 12:44
@optke3 optke3 marked this pull request as ready for review March 20, 2023 15:51
@optke3 optke3 changed the title sui: integration start, Move.toml, copy some files from Pyth-Aptos contracts sui: integration start, Move.toml, copy some modules from Pyth-Aptos contracts Mar 20, 2023
@optke3 optke3 changed the title sui: integration start, Move.toml, copy some modules from Pyth-Aptos contracts sui: integration start, set up dependencies, copy over modules from Pyth-Aptos Mar 20, 2023
@optke3 optke3 changed the base branch from sui/integration to main March 20, 2023 20:18
@optke3 optke3 merged commit cbcc294 into main Mar 21, 2023
@optke3 optke3 deleted the sui/initial_contracts_from_aptos branch March 21, 2023 14:58
@optke3 optke3 changed the title sui: integration start, set up dependencies, copy over modules from Pyth-Aptos [sui]: integration start, set up dependencies, copy over modules from Pyth-Aptos Mar 22, 2023
@optke3 optke3 changed the title [sui]: integration start, set up dependencies, copy over modules from Pyth-Aptos [sui 1/x]: integration start, set up dependencies, copy over modules from Pyth-Aptos Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants