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

getTokenMaxBuySellVolumeId

Rule Setters and Getters Retrieve the Account Max Buy Sell Size Rule Id
function getTokenMaxBuySellVolumeId(ActionTypes _actions) external view returns (uint32);
Parameters
NameTypeDescription
_actionsActionTypesthe action types
Returns
NameTypeDescription
<none>uint32accountMaxBuySellSizeId

setTokenMaxBuySellVolumeId

that setting a rule will automatically activate it. Set the TokenMaxBuySellVolume. Restricted to rule administrators only.
function setTokenMaxBuySellVolumeId(ActionTypes[] calldata _actions, uint32 _ruleId)
    external
    ruleAdministratorOnly(lib.handlerBaseStorage().appManager);
Parameters
NameTypeDescription
_actionsActionTypes[]the action types
_ruleIduint32Rule Id to set

setTokenMaxBuySellVolumeIdFull

that setting a rule will automatically activate it. This function does not check that the array length is greater than zero to allow for clearing out of the action types data Set the TokenMaxBuySellVolume suite. Restricted to rule administrators only.
function setTokenMaxBuySellVolumeIdFull(ActionTypes[] calldata _actions, uint32[] calldata _ruleIds)
    external
    ruleAdministratorOnly(lib.handlerBaseStorage().appManager);
Parameters
NameTypeDescription
_actionsActionTypes[]actions to have the rule applied to
_ruleIdsuint32[]Rule Id corresponding to the actions

clearTokenMaxBuySellVolume

Clear the rule data structure
function clearTokenMaxBuySellVolume() internal;

clearTokenMaxBuySellVolumeAccumulators

Clear the rule data accumulators
function clearTokenMaxBuySellVolumeAccumulators() internal;

setTokenMaxBuySellVolumeIdUpdate

that setting a rule will automatically activate it. Set the TokenMaxBuySellVolume.
function setTokenMaxBuySellVolumeIdUpdate(ActionTypes _action, uint32 _ruleId) internal;
Parameters
NameTypeDescription
_actionActionTypesthe action type to set the rule
_ruleIduint32Rule Id to set

activateTokenMaxBuySellVolume

enable/disable rule. Disabling a rule will save gas on transfer transactions.
function activateTokenMaxBuySellVolume(ActionTypes[] calldata _actions, bool _on)
    external
    ruleAdministratorOnly(lib.handlerBaseStorage().appManager);
Parameters
NameTypeDescription
_actionsActionTypes[]the action type to set the rule
_onboolboolean representing if a rule must be checked or not.

isTokenMaxBuySellVolumeActive

Tells you if the Account Max Buy Sell Size Rule is active or not.
function isTokenMaxBuySellVolumeActive(ActionTypes _action) external view returns (bool);
Parameters
NameTypeDescription
_actionActionTypesthe action type
Returns
NameTypeDescription
<none>boolboolean representing if the rule is active