Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Important: If you're upgrading snforge to version 0.48.0 or later, please read the 0.48.0 Migration Guide.

serialize

Serialize Cairo expressions into calldata.

--arguments

Required.

Function arguments provided as a comma-separated string of Cairo expressions. For example: --arguments '1, 2, MyStruct { x: 1, y: 2 }, MyEnum::Variant'

For more information on supported expressions and syntax, see Calldata Transformation.

--class-hash, -c <CLASS-HASH>

Optional. Conflicts with: --contract-address, --abi-file

The class hash of the contract class which contains the function, in hex (prefixed with '0x') or decimal representation.

--contract-address, -d <CONTRACT_ADDRESS>

Optional. Conflicts with: --class-hash, --abi-file

The address of the contract which contains the function, in hex (prefixed with '0x') or decimal representation.

--abi-file, <ABI_FILE_PATH>

Optional. Conflicts with: --class-hash, --contract-address

Path to the file holding contract ABI.

--function, -f <FUNCTION_NAME>

Required.

The name of the function whose calldata should be serialized.

--url, -u <RPC_URL>

Optional.

Starknet RPC node url address.

Overrides url from snfoundry.toml.

--network <NETWORK>

Optional.

Use predefined network with public provider

Possible values: mainnet, sepolia.