Upgrades for name token and registrar.#31
Open
zie1ony wants to merge 2 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.
This pull request introduces several important updates across the codebase, focusing on upgrading dependencies, adding a new upgrade scenario for the Registrar contract, improving timestamp handling, and refining contract logic. The most notable changes are summarized below.
Dependency and Toolchain Upgrades:
odraworkspace dependencies from version2.4.0to2.8.1inCargo.toml, ensuring compatibility with the latest features and fixes.nightly-2026-01-01instead ofnightly-2025-01-01.New Scenario & CLI Enhancements:
UpgradeRegistrarscenario to the CLI, allowing the Registrar contract to be upgraded via the command line. This includes implementing the scenario logic and registering it in the CLI entrypoint. [1] [2] [3]Contract Logic Improvements:
Registrarcontract by introducing a utility functiontrim_microseconds_to_milliseconds_if_needed, which prevents bugs caused by off-chain systems supplying timestamps in microseconds instead of milliseconds. This function is now used in the expiration check, and unit tests have been added for it. [1] [2] [3]NameTokencontract's transfer logic by usingraw_transferinstead of manually fetching the owner and callingraw_transfer_from.Deployment Script Adjustments:
Noneparameter toload_or_deploy_with_cfgcalls for all contract components, aligning with updated API requirements. [1] [2] [3] [4] [5]These changes collectively enhance contract upgradability, improve robustness against off-chain integration issues, and keep the project up to date with the latest dependencies and toolchain.