As described in the architecture section of the docs, the Forte Rules Engine can be conceptually segmented into three main categories — token contracts, client contracts, and the protocol contracts.

Token Contracts

The token contracts include the ERC-20 fungible assets used in your application and the ERC-721 NFT contracts. For example, perhaps you have an ERC-20 with the symbol GOLD, which is used to power the economy of a web3 game. Additionally, you may have several ERC-721 contracts that represent various player owned assets such as their actual character, weapons and/or armor the player can equip, and resources which can be used for various purposes.

You have full control of these contracts, but they do need to inherit the IProtocolToken interface and implement some logic that hooks into the Forte Rules Engine.

Client Contracts

The client contracts are provided by the protocol and should not be changed. These contracts connect your token contracts to the Forte Rules Engine protocol contracts. At a minimum you’ll need to deploy an App Manager, App Handler, and Token Handler to begin configuring rules that manage the contraints of your application tokens.

Protocol Contracts

The protocol contracts are where rules for your application are processed. In most cases, you will not need to deploy these contracts and can use the address for the rule processor diamond we’ve already deployed. Check the supported chains for your use case.

If you are heavily testing the rules in a local stack then you can use the --fork-url option when starting your local anvil network and passing it the RPC URL for the network you intend to fork. This enables you to point to the protocol deployed on that chain. Here is an example command to start anvil forked from the Polygon Amoy testnet. You will likely want to use an RPC URL obtained from Alchemy or Infura,

anvil --fork-url https://rpc-amoy.polygon.technology/

Next Steps