Signature Format Rules
The canonical signature follows strict formatting rules:- Function name - Exact name from ABI
- Opening parenthesis - No space after name
- Parameter types - Only types, no names
- Comma-separated - No spaces around commas
- Closing parenthesis - No trailing content
Usage Examples
Basic Signature
No Parameters
Complex Parameter Types
Tuple Arrays
Computing Selector from Signature
Type-Safe Signatures
TypeScript can infer the exact signature type:Signature Comparison
Signatures are used to identify function uniqueness:Human-Readable Format
For display purposes, you may want a human-readable format:Fixed vs Dynamic Arrays
Array notation in signatures:Error Handling
See Also
- getSelector - Get 4-byte selector from signature
- encodeParams - Encode function calldata
- format - Format ABI item to signature with parameter names

