starknet_api: replace LazyLock Felt/ContractAddress with const from_hex_unchecked#14395
starknet_api: replace LazyLock Felt/ContractAddress with const from_hex_unchecked#14395Yoni-Starkware wants to merge 1 commit into
Conversation
…replace LazyLock Felt/ContractAddress with const from_hex_unchecked Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PR SummaryMedium Risk Overview Call sites drop Reviewed by Cursor Bugbot for commit e52e95c. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Artifacts upload workflows: |
Summary
LazyLock<Felt>statics that encode ASCII strings or compute simple values withconst Felt = Felt::from_hex_unchecked(...)LazyLock<ContractAddress>statics that wrap known hex addresses withconst ContractAddress = ContractAddress(PatriciaKey::from_hex_unchecked(...))*dereferences at call sites sinceconst FeltisCopyand doesn't require derefLazyLock,ascii_as_felt, andFelt::from_heximportsAffected constants:
VALIDATE_RETDATA,STARKNET_BLOCK_HASH0/1,STARKNET_GAS_PRICES0,STARKNET_STATE_DIFF0COMPILED_CLASS_V1,DECLARE,DEPLOY,DEPLOY_ACCOUNT,INVOKE,L1_HANDLERQUERY_VERSION_BASE(wasFelt::TWO.pow(128))STRK_FEE_CONTRACT_ADDRESS,ETH_FEE_CONTRACT_ADDRESSTest plan
cargo build -p starknet_apipassescargo build -p apollo_rpc_executionpassescargo build -p blockifierpasses🤖 Generated with Claude Code