Skip to content

Conversation

tdelabro
Copy link
Collaborator

@tdelabro tdelabro commented Oct 6, 2025

Add the type ChainId

What is the new behavior?

The ChainId type allows for representing the two starknet chains, SN_MAIN and SN_SEPOLIA.
It offers type conversion from and into Felt, ShortString, String.

A new Rust feature devnet allows adding a custom local devnet with any valid ShortString as name (eg. SN_DEVNET).

Also, add a new short_string! macro, for compile-time creation of ShortStrings

Does this introduce a breaking change?

Yes. Replace TryFrom<&str> for ShortString by FromStr for ShortString.
More idiomatic

@tdelabro tdelabro added the enhancement New feature or request label Oct 6, 2025
@tdelabro tdelabro force-pushed the feat-chain-id branch 2 times, most recently from 4133d80 to 037d445 Compare October 6, 2025 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant