Skip to content

@abi.decodeCall

Decode calldata into [contract signature [args]] with human-readable EVML values.

Returns: array

@abi.decodeCall(contract calldata)
NameTypeDescription
contractaddressContract the calldata targets (its verified ABI is used)
calldatabytesFull calldata including the 4-byte function selector
# Decode a token transfer
set [$to $sig $args] @abi.decodeCall(0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d 0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead0000000000000000000000000000000000000000000000000de0b6b3a7640000)
print $sig
  • @abi.encodeCall — the inverse: encode a call from signature and args
  • @abi.decode — decode raw ABI data given a type list
  • @ens — resolve the @ens(name) values back to addresses