Skip to content

feat: use Felt directly instead of Felt252 alias #2130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

eeemmmmmm
Copy link

@eeemmmmmm eeemmmmmm commented Jun 24, 2025

TITLE

feat: use Felt directly instead of Felt252 alias

Description

Implements a simple but important change: using the standardized Felt type directly from starknet_types_core instead of aliasing it as Felt252.

The change is minimal but strategic - it adds a backward-compatible type alias while setting the foundation for future code to use the proper Felt type. This aligns cairo-vm with the broader Starknet ecosystem's standardization efforts.

Description of the pull request changes and motivation.

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

@gabrielbosio
Copy link
Collaborator

Hi @eeemmmmmm, I am curious to know what project needs to use this alias so that we are sure we are not adding something to the VM API that is not used by anyone

@eeemmmmmm
Copy link
Author

Hey @gabrielbosio, this change improves code clarity by using the direct type name Felt while maintaining backward compatibility with a Felt252 type alias. The alias ensures existing code continues to work without changes while allowing new code to use the more straightforward name

@eeemmmmmm
Copy link
Author

To answer your question: The Felt252 alias is widely used throughout the cairo-vm codebase itself. The alias maintains API stability for all existing code while allowing new code to use the more intuitive name.

@gabrielbosio
Copy link
Collaborator

I realized that I have mixed terms... What I meant is if there is a project that needs to use the felt type from the VM using the original name Felt instead of the Felt252 alias (One reason I think of is for name consistency with other dependencies, but I am curious if there is a concrete use case).

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