Added option for raw_input attribute on entrypoints.#9793
Open
Conversation
6609345 to
6849818
Compare
TomerStarkware
approved these changes
Mar 26, 2026
Collaborator
TomerStarkware
left a comment
There was a problem hiding this comment.
@TomerStarkware reviewed 30 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on orizi).
Additionally added a proxy-style example contract.
6849818 to
8276967
Compare
TomerStarkware
approved these changes
Mar 30, 2026
Collaborator
TomerStarkware
left a comment
There was a problem hiding this comment.
@TomerStarkware reviewed 24 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on orizi).
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.

Summary
Adds support for the
#[raw_input]attribute for Starknet contract functions, allowing functions to receive rawSpan<felt252>input data directly without automatic deserialization. Also includes a new proxy contract example that demonstrates library calls using this feature.Type of change
Please check one:
Why is this change needed?
This change enables more flexible contract patterns, particularly proxy contracts that need to forward raw call data to other contracts via library calls. Without
#[raw_input], functions must define specific parameter types, making it difficult to create generic proxy functions that can handle arbitrary call data.What was the behavior or documentation before?
Previously, all external functions required explicitly typed parameters that would be automatically deserialized from the input data. There was no way to access the raw
Span<felt252>input directly.What is the behavior or documentation after?
Functions can now be marked with
#[raw_input]to receive the raw input data as aSpan<felt252>parameter. The attribute enforces that:self)Span<felt252>refparameterRelated issue or discussion (if any)
This feature enables proxy contract patterns commonly used in upgradeable contract architectures.
Additional context
The implementation includes comprehensive validation and error messages for incorrect usage of the
#[raw_input]attribute. The proxy contract example demonstrates practical usage with library calls to different contract implementations.Note
Medium Risk
Updates the Starknet plugin’s entrypoint wrapper generation to support bypassing calldata deserialization, which can affect how all external entrypoints receive and validate inputs.
Overview
Adds a new
#[raw_input]attribute for Starknet entrypoints so functions can receive the raw calldataSpan::<felt252>directly, skipping the usual parameter deserialization and the trailing "input too long" check.Updates plugin codegen and tests to validate
raw_inputusage (must be a single calldata parameter) and adds a newproxyexample contract plus generated test vectors (.sierra,contract_class.json,compiled_contract_class.json) and hash fixtures to exercise raw forwarding vialibrary_call_syscall.Written by Cursor Bugbot for commit 8276967. This will update automatically on new commits. Configure here.