Skip to content
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

cli raw input support #112

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/starkware/starknet/cli/starknet_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,9 @@ def validate_call_function_args(
)

if abi_entry["name"] == args.function:
if args.raw:
break

validate_arguments(
inputs=inputs,
abi_entry=abi_entry,
Expand Down Expand Up @@ -1392,7 +1395,7 @@ def add_declare_tx_arguments(parser: argparse.ArgumentParser):

def add_call_function_arguments(parser: argparse.ArgumentParser):
"""
Adds the arguments: address, abi, function, inputs.
Adds the arguments: address, abi, function, inputs, raw.
"""
parser.add_argument(
"--address", type=str, required=True, help="The address of the invoked contract."
Expand All @@ -1406,6 +1409,9 @@ def add_call_function_arguments(parser: argparse.ArgumentParser):
parser.add_argument(
"--inputs", type=str, nargs="*", default=[], help="The inputs to the invoked function."
)
parser.add_argument(
"--raw", action="store_true", help="Function inputs are in raw format."
)


def add_call_l1_handler_arguments(parser: argparse.ArgumentParser):
Expand Down