chore(sui): update contracts for current Sui framework#218
Open
1-4200 wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates the Sui contracts for the current Sui framework and Move 2024 edition APIs.
Key Changes
Move.tomlfiles fromedition = "2024.beta"toedition = "2024".type_name::get*totype_name::with_*vector::empty()tovector[]VecSet.size()toVecSet.length()std::unit_testcoin_registry::new_currencyflow.ZROfrom an OTWdroptype to akeycoin type.zro::zro::new_currency(&mut CoinRegistry, &mut TxContext).Move.lockfiles.Published.tomlmetadata.Callauthorization.uln-302set_configtests now create config calls throughEndpointV2.DvnFeeLib,ExecutorFeeLib, andPriceFeedtests now use the tested module’sCallCapidentity as the call callee.ZRO Issuance Flow Change
ZRO is no longer created automatically during package
init.After publishing the ZRO package, call:
This creates and finalizes the shared
Currency<ZRO>throughCoinRegistryin the same transaction, then transfersTreasuryCap<ZRO>andMetadataCap<ZRO>to the caller.Unlike the OTW
new_currency_with_otwflow, this does not require a separatefinalize_registrationtransaction.Verification
Verified with the local Sui CLI.
sui --version # sui 1.73.0-0a9aa917aabeBuild
Ran the following build command for all Sui packages under
packages/layerzero-v2/sui/contracts.Result:
All 35 Sui packages build successfully with no deprecated API warnings.
Targeted Tests
Ran the following targeted tests.
Results:
endpoint-v2oftdvnexecutoruln-302dvn-fee-libexecutor-fee-libprice-feed