DelegateApproval

  function initialize(
  ) external

  function approve(
    address delegate,
    uint8 actions
  ) external

Parameters:arrow-up-right

Name
Type
Description

delegate

address

The address of delegate

actions

uint8

The actions to be approved

  function revoke(
    address delegate,
    uint8 actions
  ) external

Parameters:arrow-up-right

Name
Type
Description

delegate

address

The address of delegate

actions

uint8

The actions to be revoked

getClearingHouseOpenPositionActionarrow-up-right

Return Values:arrow-up-right

Name
Type
Description

action

uint8

The value of action _CLEARINGHOUSE_OPENPOSITION

getClearingHouseAddLiquidityActionarrow-up-right

Return Values:arrow-up-right

Name
Type
Description

action

uint8

The value of action _CLEARINGHOUSE_ADDLIQUIDITY

getClearingHouseRemoveLiquidityActionarrow-up-right

Return Values:arrow-up-right

Name
Type
Description

action

uint8

The value of action _CLEARINGHOUSE_REMOVELIQUIDITY

getApprovedActionsarrow-up-right

Parameters:arrow-up-right

Name
Type
Description

trader

address

The address of trader

delegate

address

The address of delegate

Return Values:arrow-up-right

Name
Type
Description

actions

uint8

The approved actions

hasApprovalForarrow-up-right

Parameters:arrow-up-right

Name
Type
Description

trader

address

The address of trader

delegate

address

The address of delegate

actions

uint8

The actions to be checked

Return Values:arrow-up-right

Name
Type
Description

true

bool

if delegate is allowed to perform each actions for trader, otherwise false

canOpenPositionForarrow-up-right

Parameters:arrow-up-right

Name
Type
Description

trader

address

The address of trader

delegate

address

The address of delegate

Return Values:arrow-up-right

Name
Type
Description

true

bool

if delegate can open position for trader, otherwise false

canAddLiquidityForarrow-up-right

Parameters:arrow-up-right

Name
Type
Description

trader

address

The address of trader

delegate

address

The address of delegate

Return Values:arrow-up-right

Name
Type
Description

true

bool

if delegate can add liquidity for trader, otherwise false

canRemoveLiquidityForarrow-up-right

Parameters:arrow-up-right

Name
Type
Description

trader

address

The address of trader

delegate

address

The address of delegate

Return Values:arrow-up-right

Name
Type
Description

true

bool

if delegate can remove liquidity for trader, otherwise false

Last updated