userCmd Callpaths

The standard call to CrocSwapDex is run through userCmd()

The method call follows the below generalized format:

function userCmd (
  uint16 callpath, 
  bytes calldata cmd)
  public payable returns (bytes memory)

callpath is a 16-bit index that identifies the specific proxy contract the command call is forwarded to through DELEGATECALL.

cmd is the raw bytestring that's passed unmodified to the specific callpath. The format of this bytestring is dependent on the specific callpath.

Every call returns the raw bytestring returned by the raw callpath, which may or may not be empty.

Last updated