stellar contract invoke, each --arg-name <value> flag is parsed according to the contract’s type spec. This guide shows the correct format for each supported type.
Integers (u32, i32, u64, i64)
Pass bare numeric literals directly on the command line.
Large Integers (u128, i128, u256, i256)
Pass bare numeric literals, just like small integers. The CLI reads the raw value as a string internally, bypassing JSON number precision limits entirely.
Boolean
Passtrue or false as unquoted literals.
String
Bare words work for simple strings. Numbers and booleans are also accepted and are automatically converted to their string representation, so you do not need to add extra quoting. Explicit JSON quoting is also accepted.Symbol
Symbols follow the same rules asString: bare words, numbers, and booleans are all accepted, and non-string JSON values are auto-converted.
Address
You can pass either a locally known identity name (e.g.alice) or a raw Stellar strkey (G… for accounts, C… for contracts).
Bytes / BytesN
Pass a hex-encoded string representing the byte sequence.Optional Arguments
Simply omit the flag. The CLI will supply avoid / null value for any Option<T> parameter that is not provided.
Vec
Pass a JSON array, quoting the whole value so the shell does not split it.Map
Pass a JSON object with string keys.Tuple
Pass a JSON array whose elements match the tuple’s field order.Struct (User-Defined Type)
Pass a JSON object with the struct’s named fields.Enum / Union (User-Defined Type)
For unit variants, pass the variant name as a plain string. For variants that carry a value, pass a JSON object with the variant name as the key.File-Based Arguments
For long or complex JSON values, use the--arg-file-path flag variant to load the value from a file instead of inlining it on the command line. The flag name is derived from the argument name by appending -file-path.
Bytes and BytesN parameters, the file’s raw binary content is read directly — no hex encoding is required.