Documentation Index
Fetch the complete documentation index at: https://thrackle.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Git Source
Inherits:
ActionTypesArray, Ownable, RuleAdministratorOnly, IApplicationHandlerEvents, ICommonApplicationHandlerEvents, IInputErrors, IZeroAddressError, IAppHandlerErrors, ProtocolApplicationHandlerCommon
Author:
@ShaneDuncan602, @oscarsernarosero, @TJ-Everett
This contract is the rules handler for all application level rules. It is implemented via the AppManager
This contract is injected into the appManagers.
State Variables
VERSION
string private constant VERSION = "1";
appPricing
ApplicationPricing appPricing;
appPricingAddress
address public appPricingAddress;
appManager
IAppManager immutable appManager;
appManagerAddress
address public immutable appManagerAddress;
ruleProcessor
IRuleProcessor immutable ruleProcessor;
ruleProcessorAddress
address public immutable ruleProcessorAddress;
Rule mappings
accountMaxValueByAccessLevel
mapping(ActionTypes => Rule) accountMaxValueByAccessLevel;
accountMaxReceivedByAccessLevel
mapping(ActionTypes => Rule) accountMaxReceivedByAccessLevel;
accountMaxReceivedByRiskScore
mapping(ActionTypes => Rule) accountMaxReceivedByAccessLevel;
accountMaxValueByRiskScore
mapping(ActionTypes => Rule) accountMaxValueByRiskScore;
accountMaxTxValueByRiskScore
mapping(ActionTypes => Rule) accountMaxTxValueByRiskScore;
accountMaxValueOutByAccessLevel
mapping(ActionTypes => Rule) accountMaxValueOutByAccessLevel;
accountDenyForNoAccessLevel
mapping(ActionTypes => Rule) accountDenyForNoAccessLevel;
Account Max Received by Access Level Accumulator
mapping(address => uint128) usdValueAccountMaxReceived;
pauseRuleActive
Pause Rule on-off switch
bool public pauseRuleActive;
usdValueTransactedInRiskPeriod
MaxTxSizePerPeriodByRisk data
mapping(address => uint128) usdValueTransactedInRiskPeriod;
lastTxDateRiskRule
mapping(address => uint64) lastTxDateRiskRule;
usdValueTotalWithrawals
mapping(address => uint128) usdValueTotalWithrawals;
usdValueAccountMaxReceived
Account Max Received by Access Level Accumulator
mapping(address => uint128) usdValueAccountMaxReceived;
Functions
constructor
Initializes the contract setting the AppManager address as the one provided and setting the ruleProcessor for protocol access
constructor(address _ruleProcessorProxyAddress, address _appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_ruleProcessorProxyAddress | address | of the protocol’s Rule Processor contract. |
_appManagerAddress | address | address of the application AppManager. |
_checkWhichApplicationRulesActive
function _checkWhichApplicationRulesActive(ActionTypes _action) internal view returns (bool);
_checkNonCustodialRules
function _checkNonCustodialRules(ActionTypes _action) internal view returns (bool);
requireApplicationRulesChecked
checks if any of the Application level rules are active
function requireApplicationRulesChecked(ActionTypes _action, address _sender) external view returns (bool);
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | the current action type |
_sender | address | |
Returns
| Name | Type | Description |
|---|
<none> | bool | true if one or more rules are active |
checkApplicationRules
Check Application Rules for valid transaction.
function checkApplicationRules(
address _tokenAddress,
address _sender,
address _from,
address _to,
uint256 _amount,
uint16 _nftValuationLimit,
uint256 _tokenId,
ActionTypes _action,
HandlerTypes _handlerType
) external onlyOwner;
Parameters
| Name | Type | Description |
|---|
_tokenAddress | address | address of the token |
_sender | address | address of the calling account passed through from the token |
_from | address | address of the from account |
_to | address | address of the to account |
_amount | uint256 | amount of tokens to be transferred |
_nftValuationLimit | uint16 | number of tokenID’s per collection before checking collection price vs individual token price |
_tokenId | uint256 | tokenId of the NFT token |
_action | ActionTypes | Action to be checked. This param is intentially added for future enhancements. |
_handlerType | HandlerTypes | the type of handler, used to direct to correct token pricing |
_checkRiskRules
Based on the Handler Type retrieve pricing valuations
This function consolidates all the Risk rule checks.
function _checkRiskRules(
address _from,
address _to,
address _sender,
uint128 _balanceValuation,
uint128 _transferValuation,
ActionTypes _action
) internal;
Parameters
| Name | Type | Description |
|---|
_from | address | address of the from account |
_to | address | address of the to account |
_sender | address | address of the caller |
_balanceValuation | uint128 | recepient address current total application valuation in USD with 18 decimals of precision |
_transferValuation | uint128 | valuation of the token being transferred in USD with 18 decimals of precision |
_action | ActionTypes | the current user action |
_checkAccessLevelRules
non custodial buy
non custodial sell
This function consolidates all the Access Level rule checks.
function _checkAccessLevelRules(
address _from,
address _to,
address _sender,
uint128 _balanceValuation,
uint128 _transferValuation,
ActionTypes _action
) internal;
Parameters
| Name | Type | Description |
|---|
_from | address | address of the from account |
_to | address | address of the to account |
_sender | address | address of the to caller |
_balanceValuation | uint128 | recepient address current total application valuation in USD with 18 decimals of precision |
_transferValuation | uint128 | valuation of the token being transferred in USD with 18 decimals of precision |
_action | ActionTypes | the current user action |
_checkAccountMaxTxValueByRiskScore
Non custodial buy
Non custodial sell
This function consolidates the MaxTXValueByRiskScore rule checks for the from address.
function _checkAccountMaxTxValueByRiskScore(
ActionTypes _action,
address _address,
uint8 _riskScoreFrom,
uint128 _transferValuation
) internal;
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | the current user action |
_address | address | address of the account |
_riskScoreFrom | uint8 | sender address risk score |
_transferValuation | uint128 | valuation of the token being transferred in USD with 18 decimals of precision |
setNFTPricingAddress
-------------- Pricing Module Configurations ---------------
Sets the address of the nft pricing contract and loads the contract.
function setNFTPricingAddress(address _address) external ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_address | address | Nft Pricing Contract address. |
setERC20PricingAddress
Sets the address of the erc20 pricing contract and loads the contract.
function setERC20PricingAddress(address _address) external ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_address | address | ERC20 Pricing Contract address. |
getAccTotalValuation
This gets the account’s balance in dollars.
Get the account’s balance in dollars. It uses the registered tokens in the app manager.
function getAccTotalValuation(address _account, uint256 _nftValuationLimit)
public
view
returns (uint256 totalValuation);
Parameters
| Name | Type | Description |
|---|
_account | address | address to get the balance for |
_nftValuationLimit | uint256 | |
Returns
| Name | Type | Description |
|---|
totalValuation | uint256 | of the account in dollars |
_getERC20Price
check if _account is zero address. If zero address we return a valuation of zero to allow for burning tokens when rules that need valuations are active.
Loop through all Nfts and ERC20s and add values to balance for account valuation
Check to see if user owns the asset
This gets the token’s value in dollars.
Get the value for a specific ERC20. This is done by interacting with the pricing module
function _getERC20Price(address _tokenAddress) internal view returns (uint256);
Parameters
| Name | Type | Description |
|---|
_tokenAddress | address | the address of the token |
Returns
| Name | Type | Description |
|---|
<none> | uint256 | price the price of 1 in dollars |
getERC20PricingAddress
function getERC20PricingAddress() external view returns (address);
getERC721PricingAddress
function getERC721PricingAddress() external view returns (address);
_getNFTValuePerCollection
This gets the token’s value in dollars.
Get the value for a specific ERC721. This is done by interacting with the pricing module
function _getNFTValuePerCollection(address _tokenAddress, address _account, uint256 _tokenAmount)
internal
view
returns (uint256 totalValueInThisContract);
Parameters
| Name | Type | Description |
|---|
_tokenAddress | address | the address of the token |
_account | address | of the token holder |
_tokenAmount | uint256 | amount of NFTs from _tokenAddress contract |
Returns
| Name | Type | Description |
|---|
totalValueInThisContract | uint256 | in whole USD |
_getNFTCollectionValue
This function gets the total token value in dollars of all tokens owned in each collection by address.
Get the total value for all tokens held by a wallet for a specific collection. This is done by interacting with the pricing module
function _getNFTCollectionValue(address _tokenAddress, uint256 _tokenAmount)
private
view
returns (uint256 totalValueInThisContract);
Parameters
| Name | Type | Description |
|---|
_tokenAddress | address | the address of the token |
_tokenAmount | uint256 | amount of NFTs from _tokenAddress contract |
Returns
| Name | Type | Description |
|---|
totalValueInThisContract | uint256 | total valuation of tokens by collection in whole USD |
setAccountMaxValueByRiskScoreId
that setting a rule will automatically activate it.
Set the accountMaxValueByRiskScoreRule. Restricted to app administrators only.
function setAccountMaxValueByRiskScoreId(ActionTypes[] calldata _actions, uint32 _ruleId)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | action types in which to apply the rules |
_ruleId | uint32 | Rule Id to set |
setAccountMaxValueByRiskScoreIdFull
that setting a rule will automatically activate it.
Set the accountMaxValueByRiskScoreRule. Restricted to app administrators only.
function setAccountMaxValueByRiskScoreIdFull(ActionTypes[] calldata _actions, uint32[] calldata _ruleIds)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | actions to have the rule applied to |
_ruleIds | uint32[] | Rule Id corresponding to the actions |
clearAccountMaxValueByRiskScore
Clear the rule data structure
function clearAccountMaxValueByRiskScore() internal;
setAccountMaxValueByRiskScoreIdUpdate
that setting a rule will automatically activate it.
Set the AccountMaxValuebyRiskSCoreRuleId.
function setAccountMaxValueByRiskScoreIdUpdate(ActionTypes _action, uint32 _ruleId) internal;
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | the action type to set the rule |
_ruleId | uint32 | Rule Id to set |
activateAccountMaxValueByRiskScore
enable/disable rule. Disabling a rule will save gas on transfer transactions.
function activateAccountMaxValueByRiskScore(ActionTypes[] calldata _actions, bool _on)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | action types |
_on | bool | boolean representing if a rule must be checked or not. |
isAccountMaxValueByRiskScoreActive
Tells you if the accountMaxValueByRiskScore Rule is active or not.
function isAccountMaxValueByRiskScoreActive(ActionTypes _action) external view returns (bool);
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | the action type |
Returns
| Name | Type | Description |
|---|
<none> | bool | boolean representing if the rule is active |
getAccountMaxValueByRiskScoreId
Retrieve the accountMaxValueByRiskScore rule id
function getAccountMaxValueByRiskScoreId(ActionTypes _action) external view returns (uint32);
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | action type |
Returns
| Name | Type | Description |
|---|
<none> | uint32 | accountMaxValueByRiskScoreId rule id |
setAccountDenyForNoAccessLevelId
that setting a rule will automatically activate it.
Set the activateAccountDenyForNoAccessLevel. Restricted to app administrators only.
function setAccountDenyForNoAccessLevelId(ActionTypes[] calldata _actions)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | action types in which to apply the rules |
setAccountDenyForNoAccessLevelIdFull
that setting a rule will automatically activate it.
Set the activateAccountDenyForNoAccessLevel. Restricted to app administrators only.
function setAccountDenyForNoAccessLevelIdFull(ActionTypes[] calldata _actions)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | actions to have the rule applied to |
clearAccountDenyForNoAccessLevel
Clear the rule data structure
function clearAccountDenyForNoAccessLevel() internal;
setAccountDenyForNoAccessLevelIdUpdate
that setting a rule will automatically activate it.
Set the AccountDenyForNoAccessLevelRuleId.
function setAccountDenyForNoAccessLevelIdUpdate(ActionTypes _action) internal;
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | the action type to set the rule |
activateAccountDenyForNoAccessLevelRule
enable/disable rule. Disabling a rule will save gas on transfer transactions.
function activateAccountDenyForNoAccessLevelRule(ActionTypes[] calldata _actions, bool _on)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | action types |
_on | bool | boolean representing if a rule must be checked or not. |
isAccountDenyForNoAccessLevelActive
Tells you if the AccountDenyForNoAccessLevel Rule is active or not.
function isAccountDenyForNoAccessLevelActive(ActionTypes _action) external view returns (bool);
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | the action type |
Returns
| Name | Type | Description |
|---|
<none> | bool | boolean representing if the rule is active |
setAccountMaxReceivedByAccessLevelId
that setting a rule will automatically activate it.
Set the accountMaxReceivedByAccessLevelRule. Restricted to app administrators only.
function setAccountMaxReceivedByAccessLevelId(ActionTypes[] calldata _actions, uint32 _ruleId)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | action types in which to apply the rules |
_ruleId | uint32 | Rule Id to set |
setAccountMaxReceivedByAccessLevelIdFull
that setting a rule will automatically activate it.
Set the accountMaxReceivedByAccessLevelRule. Restricted to app administrators only.
function setAccountMaxReceivedByAccessLevelIdFull(ActionTypes[] calldata _actions, uint32[] calldata _ruleIds)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | actions to have the rule applied to |
_ruleIds | uint32[] | Rule Id corresponding to the actions |
clearAccountMaxReceivedByAccessLevel
Clear the rule data structure
function clearAccountMaxReceivedByAccessLevel() internal;
setAccountMaxReceivedbyAccessLevelIdUpdate
that setting a rule will automatically activate it.
Set the AccountMaxReceivedbyAccessLevelRuleId.
function setAccountMaxReceivedbyAccessLevelIdUpdate(ActionTypes _action, uint32 _ruleId) internal;
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | the action type to set the rule |
_ruleId | uint32 | Rule Id to set |
activateAccountMaxReceivedByAccessLevel
enable/disable rule. Disabling a rule will save gas on transfer transactions.
function activateAccountMaxReceivedByAccessLevel(ActionTypes[] calldata _actions, bool _on)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | action types |
_on | bool | boolean representing if a rule must be checked or not. |
isAccountMaxReceivedByAccessLevelActive
Tells you if the accountMaxReceivedByAccessLevel Rule is active or not.
function isAccountMaxReceivedByAccessLevelActive(ActionTypes _action) external view returns (bool);
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | the action type |
Returns
| Name | Type | Description |
|---|
<none> | bool | boolean representing if the rule is active |
getAccountMaxReceivedByAccessLevelId
Retrieve the accountMaxReceivedByAccessLevel rule id
function getAccountMaxReceivedByAccessLevelId(ActionTypes _action) external view returns (uint32);
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | action type |
Returns
| Name | Type | Description |
|---|
<none> | uint32 | accountMaxReceivedByAccessLevelId rule id |
setAccountMaxValueByAccessLevelId
that setting a rule will automatically activate it.
Set the accountMaxValueByAccessLevelRule. Restricted to app administrators only.
function setAccountMaxValueByAccessLevelId(ActionTypes[] calldata _actions, uint32 _ruleId)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | action types in which to apply the rules |
_ruleId | uint32 | Rule Id to set |
setAccountMaxValueByAccessLevelIdFull
that setting a rule will automatically activate it.
Set the accountMaxValueByAccessLevelRule. Restricted to app administrators only.
function setAccountMaxValueByAccessLevelIdFull(ActionTypes[] calldata _actions, uint32[] calldata _ruleIds)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | actions to have the rule applied to |
_ruleIds | uint32[] | Rule Id corresponding to the actions |
clearAccountMaxValueByAccessLevel
Clear the rule data structure
function clearAccountMaxValueByAccessLevel() internal;
setAccountMaxValuebyAccessLevelIdUpdate
that setting a rule will automatically activate it.
Set the AccountMaxValuebyAccessLevelRuleId.
function setAccountMaxValuebyAccessLevelIdUpdate(ActionTypes _action, uint32 _ruleId) internal;
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | the action type to set the rule |
_ruleId | uint32 | Rule Id to set |
activateAccountMaxValueByAccessLevel
enable/disable rule. Disabling a rule will save gas on transfer transactions.
function activateAccountMaxValueByAccessLevel(ActionTypes[] calldata _actions, bool _on)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | action types |
_on | bool | boolean representing if a rule must be checked or not. |
isAccountMaxValueByAccessLevelActive
Tells you if the accountMaxValueByAccessLevel Rule is active or not.
function isAccountMaxValueByAccessLevelActive(ActionTypes _action) external view returns (bool);
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | the action type |
Returns
| Name | Type | Description |
|---|
<none> | bool | boolean representing if the rule is active |
getAccountMaxValueByAccessLevelId
Retrieve the accountMaxValueByAccessLevel rule id
function getAccountMaxValueByAccessLevelId(ActionTypes _action) external view returns (uint32);
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | action type |
Returns
| Name | Type | Description |
|---|
<none> | uint32 | accountMaxValueByAccessLevelId rule id |
setAccountMaxValueOutByAccessLevelId
that setting a rule will automatically activate it.
Set the AccountMaxValueOutByAccessLevel. Restricted to app administrators only.
function setAccountMaxValueOutByAccessLevelId(ActionTypes[] calldata _actions, uint32 _ruleId)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | action types in which to apply the rules |
_ruleId | uint32 | Rule Id to set |
setAccountMaxValueOutByAccessLevelIdFull
that setting a rule will automatically activate it.
Set the AccountMaxValueOutByAccessLevel. Restricted to app administrators only.
function setAccountMaxValueOutByAccessLevelIdFull(ActionTypes[] calldata _actions, uint32[] calldata _ruleIds)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | actions to have the rule applied to |
_ruleIds | uint32[] | Rule Id corresponding to the actions |
clearAccountMaxValueOutByAccessLevel
Clear the rule data structure
function clearAccountMaxValueOutByAccessLevel() internal;
setAccountMaxValueOutByAccessLevelIdUpdate
that setting a rule will automatically activate it.
Set the AccountMaxValueOutByAccessLevelRuleId.
function setAccountMaxValueOutByAccessLevelIdUpdate(ActionTypes _action, uint32 _ruleId) internal;
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | the action type to set the rule |
_ruleId | uint32 | Rule Id to set |
activateAccountMaxValueOutByAccessLevel
enable/disable rule. Disabling a rule will save gas on transfer transactions.
function activateAccountMaxValueOutByAccessLevel(ActionTypes[] calldata _actions, bool _on)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | action types |
_on | bool | boolean representing if a rule must be checked or not. |
isAccountMaxValueOutByAccessLevelActive
Tells you if the AccountMaxValueOutByAccessLevel Rule is active or not.
function isAccountMaxValueOutByAccessLevelActive(ActionTypes _action) external view returns (bool);
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | the action type |
Returns
| Name | Type | Description |
|---|
<none> | bool | boolean representing if the rule is active |
getAccountMaxValueOutByAccessLevelId
Retrieve the accountMaxValueOutByAccessLevel rule id
function getAccountMaxValueOutByAccessLevelId(ActionTypes _action) external view returns (uint32);
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | action type |
Returns
| Name | Type | Description |
|---|
<none> | uint32 | accountMaxValueOutByAccessLevelId rule id |
setAccountMaxTxValueByRiskScoreId
that setting a rule will automatically activate it.
Set the accountMaxTxValueByRiskScore. Restricted to app administrators only.
function setAccountMaxTxValueByRiskScoreId(ActionTypes[] calldata _actions, uint32 _ruleId)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | action types in which to apply the rules |
_ruleId | uint32 | Rule Id to set |
setAccountMaxTxValueByRiskScoreIdFull
that setting a rule will automatically activate it.
Set the accountMaxTxValueByRiskScore. Restricted to app administrators only.
function setAccountMaxTxValueByRiskScoreIdFull(ActionTypes[] calldata _actions, uint32[] calldata _ruleIds)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | actions to have the rule applied to |
_ruleIds | uint32[] | Rule Id corresponding to the actions |
clearAccountMaxTxValueByRiskScore
Clear the rule data structure
function clearAccountMaxTxValueByRiskScore() internal;
setAccountMaxTxValueByRiskScoreIdUpdate
that setting a rule will automatically activate it.
Set the AccountMaxTxValueByRiskScoreRuleId.
function setAccountMaxTxValueByRiskScoreIdUpdate(ActionTypes _action, uint32 _ruleId) internal;
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | the action type to set the rule |
_ruleId | uint32 | Rule Id to set |
activateAccountMaxTxValueByRiskScore
enable/disable rule. Disabling a rule will save gas on transfer transactions.
function activateAccountMaxTxValueByRiskScore(ActionTypes[] calldata _actions, bool _on)
external
ruleAdministratorOnly(appManagerAddress);
Parameters
| Name | Type | Description |
|---|
_actions | ActionTypes[] | action types |
_on | bool | boolean representing if a rule must be checked or not. |
isAccountMaxTxValueByRiskScoreActive
Tells you if the accountMaxTxValueByRiskScore Rule is active or not.
function isAccountMaxTxValueByRiskScoreActive(ActionTypes _action) external view returns (bool);
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | the action type |
Returns
| Name | Type | Description |
|---|
<none> | bool | boolean representing if the rule is active |
getAccountMaxTxValueByRiskScoreId
Retrieve the AccountMaxTxValueByRiskScore rule id
function getAccountMaxTxValueByRiskScoreId(ActionTypes _action) external view returns (uint32);
Parameters
| Name | Type | Description |
|---|
_action | ActionTypes | action type |
Returns
| Name | Type | Description |
|---|
<none> | uint32 | accountMaxTxValueByRiskScoreId rule id |
activatePauseRule
This function uses the onlyOwner modifier since the appManager contract is calling this function when adding a pause rule or removing the final pause rule of the array.
enable/disable rule. Disabling a rule will save gas on transfer transactions.
This function does not use ruleAdministratorOnly modifier, the onlyOwner modifier checks that the caller is the appManager contract.
function activatePauseRule(bool _on) external onlyOwner;
Parameters
| Name | Type | Description |
|---|
_on | bool | boolean representing if a rule must be checked or not. |