The purpose of this rule is to provide a way to prevent the transfer of assets for accounts that do not have an access level or whose access level has been set to 0. For example, the application may decide users may not accumulate or transfer any assets without first performing specific onboarding activities. The application developer may set the account deny for no access level rule to active. As accounts are introduced to the ecosystem, they may not receive any assets until the application changes their access level to a higher value.NOTE: access levels are restricted from 0 to 4.
This rule doesn’t apply when a treasuryAccount address is in either the from or the to side of the transaction. This doesn’t necessarily mean that if an treasury account is the one executing the transaction it will bypass the rule, unless the aforementioned condition is true.
Adding a account-deny-for-no-access-level rule is done through the function:
Copy
Ask AI
/*** @dev enable/disable rule. Disabling a rule will save gas on transfer transactions.* @param _actions list of action types* @param _on boolean representing if a rule must be checked or not.*/function activateAccountDenyForNoAccessLevelRule(ActionTypes[] calldata _actions, bool _on) external ruleAdministratorOnly(appManagerAddress)
This rule does not require an add function with the Rule Processor diamond. This rule is set in the application handler contract.