Skip to content

Conversation

@optke3
Copy link
Contributor

@optke3 optke3 commented Apr 11, 2023

Summary

  • Implement version control / contract upgradeability for Pyth.
  • Replace sequence number based replay protection with a storage system that stores all previously used VAAs for robustness (don’t want VAAs to invalidate other VAAs with older sequence numbers)
  • Use FeeCollector to store Pyth fees, instead of transferring fees to deployer, add governance action for withdrawing fee coins

Testing

sui version: sui 0.31.0-a63f425b9-dirty

@vercel
Copy link

vercel bot commented Apr 11, 2023

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

Name Status Preview Comments Updated (UTC)
xc-admin-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 3, 2023 4:33pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
example-oracle-amm ⬜️ Ignored (Inspect) May 3, 2023 4:33pm

@optke3 optke3 requested a review from Reisen April 11, 2023 22:47
@optke3 optke3 marked this pull request as ready for review April 11, 2023 22:48
Base automatically changed from sui/unit_tests_pyth_and_more to main April 30, 2023 19:46
@optke3 optke3 merged commit b609b17 into main May 3, 2023
@optke3 optke3 deleted the sui/contract_upgrades branch May 3, 2023 16:29
ali-behjati pushed a commit that referenced this pull request Jun 30, 2023
* state getters and setters, change Move.toml dependency to sui/integration_v2

* finish state.move

* add new line to pyth

* use deployer cap pattern for state module

* sui pyth

* update price feeds, dynamic object fields, Sui object PriceInfoObject

* register price info object with pyth state after creation

* sui governance

* some newlines

* error codes

* update and comment

* unit tests for pyth.move, add UpgradeCap to Pyth State (will be used for contract upgrades)

* updates

* test_get_update_fee test passes

* fix test_get_update_fee and test_update_price_feeds_corrupt_vaa

* test_update_price_feeds_invalid_data_source

* test_create_and_update_price_feeds

* test_create_and_update_price_feeds_success and test_create_and_update_price_feeds_price_info_object_not_found_failure

* test_update_cache

* update

* test_update_cache_old_update

* update_price_feeds_if_fresh

* comment

* contract upgrades start

* contract upgradeability

* update clock stuff

* edits

* use clone of sui/integration_v2 for stability

* make contract_upgrade::execute a public(friend) fun, remove clock arg

* E_INCORRECT_IDENTIFIER_LENGTH

* comment and edit

* add a single comment
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