Skip to content

Upgrades for name token and registrar.#31

Open
zie1ony wants to merge 2 commits into
masterfrom
feature/support-microsecs
Open

Upgrades for name token and registrar.#31
zie1ony wants to merge 2 commits into
masterfrom
feature/support-microsecs

Conversation

@zie1ony

@zie1ony zie1ony commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Upgraded all odra workspace dependencies from version 2.4.0 to 2.8.1 in Cargo.toml, ensuring compatibility with the latest features and fixes.
  • Updated the Rust toolchain to use nightly-2026-01-01 instead of nightly-2025-01-01.

New Scenario & CLI Enhancements:

  • Added a new UpgradeRegistrar scenario 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:

  • Improved the timestamp handling in the Registrar contract by introducing a utility function trim_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]
  • Simplified the NameToken contract's transfer logic by using raw_transfer instead of manually fetching the owner and calling raw_transfer_from.

Deployment Script Adjustments:

  • Updated deployment scripts to pass an additional None parameter to load_or_deploy_with_cfg calls 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.

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.

1 participant