Customization Options
Rule Modification
To modify an applied rule, simply create the new rule with the desired settings and apply it.
- Application Rules:
- Create Application Rules
- Token Specific Rules:
- Create Token Specific Rules
Rule Deactivation
To deactivate an applied rule, invoke the activation function and send it a parameter of false. This deactivates the rule, but it can be reactivated at any time.
- Application Rules
- Consult the Application Rule Directory for the activation function name and invoke it on the AppManager created during deployment.
- This examples uses Account Max Transaction Value By Risk Score:
- Consult the Application Rule Directory for the activation function name and invoke it on the AppManager created during deployment.
- Token Specific Rules
- Consult the Token Specific Rule Directory for the activation function name and invoke it on the Token Application Handler created during deployment.
- This example uses Account Min Max Token Balance:
- Consult the Token Specific Rule Directory for the activation function name and invoke it on the Token Application Handler created during deployment.
Activating a Deactivated Rule
To activate a deactivated rule, invoke the activation function and send it a parameter of true. This activates the rule.
- Application Rules
- Consult the Application Rule Directory for the activation function name and invoke it on the AppManager created during deployment.
- This examples uses Account Max Transaction Value By Risk Score:
- Consult the Application Rule Directory for the activation function name and invoke it on the AppManager created during deployment.
- Token Specific Rules
- Consult the Token Specific Rule Directory for the activation function name and invoke it on the TokenApplicationHandler created during deployment.
- This example uses Account Min Max Token Balance:
- Consult the Token Specific Rule Directory for the activation function name and invoke it on the TokenApplicationHandler created during deployment.
NFT Functionality
Protocol supported NFT’s implement OpenZeppelin AccessControl, ERC721, ReetrancyGuard, and ERC721Enumerable. These interfaces may be utilized in application NFT’s.
Additional logic may be added to the constructor, but it MUST still invoke the ApplicationERC721 constructor
Deploying Custom Application and Token Rules
Sometimes no matter what, there are just modifications that you would like to make that fall outside of the scope of what is supported by the protocol. For an example of updating the application level rules and deploying them, it is recommended to read about applying app rules to the protocol diamond. If you are interested in adding token level rules, first you must add the rule to the handler and then be sure to add the rule to the rule processor.