DelegateApproval
Functions
initialize
approve
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of delegate |
| uint8 | The actions to be approved |
revoke
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of delegate |
| uint8 | The actions to be revoked |
getClearingHouseOpenPositionAction
Return Values:
Name | Type | Description |
---|---|---|
| uint8 | The value of action |
getClearingHouseAddLiquidityAction
Return Values:
Name | Type | Description |
---|---|---|
| uint8 | The value of action |
getClearingHouseRemoveLiquidityAction
Return Values:
Name | Type | Description |
---|---|---|
| uint8 | The value of action |
getApprovedActions
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of trader |
| address | The address of delegate |
Return Values:
Name | Type | Description |
---|---|---|
| uint8 | The approved actions |
hasApprovalFor
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of trader |
| address | The address of delegate |
| uint8 | The actions to be checked |
Return Values:
Name | Type | Description |
---|---|---|
| bool | if delegate is allowed to perform each actions for trader, otherwise false |
canOpenPositionFor
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of trader |
| address | The address of delegate |
Return Values:
Name | Type | Description |
---|---|---|
| bool | if delegate can open position for trader, otherwise false |
canAddLiquidityFor
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of trader |
| address | The address of delegate |
Return Values:
Name | Type | Description |
---|---|---|
| bool | if delegate can add liquidity for trader, otherwise false |
canRemoveLiquidityFor
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of trader |
| address | The address of delegate |
Return Values:
Name | Type | Description |
---|---|---|
| bool | if delegate can remove liquidity for trader, otherwise false |
Last updated