Git Source

Inherits: RuleAdministratorOnly, ActionTypesArray, ITokenHandlerEvents, IAssetHandlerErrors

Author: @ShaneDuncan602 @oscarsernarosero @TJ-Everett

Setters and getters for the rule in the handler. Meant to be inherited by a handler facet to easily support the rule.

Functions

getTokenMaxTradingVolumeId

Rule Setters and Getters

Retrieve the token max trading volume rule id

function getTokenMaxTradingVolumeId(ActionTypes _action) external view returns (uint32);

Parameters

NameTypeDescription
_actionActionTypesthe action type(this left in to keep signatures the same for dependent apis)

Returns

NameTypeDescription
<none>uint32tokenMaxTradingVolumeRuleId rule id

setTokenMaxTradingVolumeId

that setting a rule will automatically activate it.

Set the TokenMaxTradingVolume. Restricted to rule administrators only.

function setTokenMaxTradingVolumeId(ActionTypes[] calldata _actions, uint32 _ruleId)
    external
    ruleAdministratorOnly(lib.handlerBaseStorage().appManager);

Parameters

NameTypeDescription
_actionsActionTypes[]the action types
_ruleIduint32Rule Id to set

setTokenMaxTradingVolumeIdFull

that setting a rule will automatically activate it.

Set the setAccountMinMaxTokenBalanceRule suite. Restricted to rule administrators only.

function setTokenMaxTradingVolumeIdFull(ActionTypes[] calldata _actions, uint32 _ruleId)
    external
    ruleAdministratorOnly(lib.handlerBaseStorage().appManager);

Parameters

NameTypeDescription
_actionsActionTypes[]actions to have the rule applied to
_ruleIduint32Rule Id corresponding to the actions

clearTokenMaxTradingVolume

Clear the rule data structure

function clearTokenMaxTradingVolume() internal;

clearTokenMaxTradingVolumeAccumulators

Clear the rule data accumulators

function clearTokenMaxTradingVolumeAccumulators() internal;

clearTokenMaxTradingVolumeSingleAction

Clear the rule data structure

function clearTokenMaxTradingVolumeSingleAction(ActionTypes _action) internal;

setTokenMaxTradingVolumeIdUpdate

that setting a rule will automatically activate it.

Set the TokenMaxTradingVolume.

function setTokenMaxTradingVolumeIdUpdate(ActionTypes _action, uint32 _ruleId) internal;

Parameters

NameTypeDescription
_actionActionTypesthe action type to set the rule
_ruleIduint32Rule Id to set

activateTokenMaxTradingVolume

Tells you if the token max trading volume rule is active or not.

function activateTokenMaxTradingVolume(ActionTypes[] calldata _actions, bool _on)
    external
    ruleAdministratorOnly(lib.handlerBaseStorage().appManager);

Parameters

NameTypeDescription
_actionsActionTypes[]the action type
_onboolboolean representing if the rule is active

isTokenMaxTradingVolumeActive

Tells you if the token max trading volume rule is active or not.

function isTokenMaxTradingVolumeActive(ActionTypes _action) public view returns (bool);

Parameters

NameTypeDescription
_actionActionTypesthe action type

Returns

NameTypeDescription
<none>boolboolean representing if the rule is active