A policy is the central configuration object in the Forte Rules Engine. It defines what rules should be executed during a contract call. Policies are stored and enforced on-chain and can be reused across different contracts and applications.

What You Can Configure in a Policy

  • A sequence of rules, defined in a specific order, each with conditions and effects
  • A set of trackers for maintaining persistent state
  • A set of mapped trackers for key-value storage functionality
  • A list of calling functions that define which smart contract functions can trigger the policy
  • A list of foreign calls that can be used as input to rule conditions, as effects triggered by a rule, or as inputs to other foreign calls
  • Policy metadata (off-chain), such as names, descriptions, and labels for readability
Rules Engine concepts flow overview
The diagram above illustrates the relationship between the various concepts in the Rules Engine. The Policy is the container for Rules, Trackers, Mapped Trackers, Calling Functions, and Foreign Call definitions. The Calling contract calls into the Rules Engine. See our Policy Syntax guide to understand how to configure a policy. Available SDK functions for policies here.