TRY ONLINE

Signature
Parameters
Calldata
Encoded calldata will appear here

EXAMPLES

Get the calldata for a function call:
cast calldata 'transfer(address,uint256)' 0xbd20e68967fc2a813356bff4754bba48692d8e0d 10000000000000000
0xa9059cbb000000000000000000000000bd20e68967fc2a813356bff4754bba48692d8e0d000000000000000000000000000000000000000000000000002386f26fc10000
Encode with different data types:
cast calldata "setDetails(string,address)" "Hello World" 0xabcdefabcdefabcdefabcdefabcdefabcdefabcd
0x1a367de70000000000000000000000000000000000000000000000000000000000000040000000000000000000000000abcdefabcdefabcdefabcdefabcdefabcdefabcd000000000000000000000000000000000000000000000000000000000000000b48656c6c6f20576f726c64000000000000000000000000000000000000000000

DOCUMENTATION

cast calldata


NAME

cast-calldata - ABI-encode a function with arguments.

SYNOPSIS

cast calldata [options] sig [args...]

DESCRIPTION

ABI-encode a function with arguments.

The signature (sig) is a fragment in the form <function name>(<types...>).

OPTIONS

Common Options

-h
--help
    Prints help information.

EXAMPLES

  1. ABI-encode the arguments for a call to someFunc(address,uint256):
    cast calldata "someFunc(address,uint256)" 0x... 1
    

SEE ALSO

cast, cast abi-encode