Skip to main content

encode_function_call

Function encode_function_call 

Source
pub fn encode_function_call(
    signature: &str,
    args: &[String],
) -> Result<String, String>
Expand description

ABI-encode calldata from a HUMAN function signature (e.g. "balanceOf(address)", "name()") + string args, supporting the common static value types: address, bool, uintN/intN (decimal or 0x hex), and bytes32 (0x-hex, left-aligned). One arg per parameter; dynamic types (string/bytes/arrays) are NOT supported here. Returns 0x-hex calldata. PURE — unit-tested.