Contributing
Please visit our Contributor Guide.Getting Started
Environment dependencies
This guide assumes the following tools are installed and configured correctly. Please see each tool’s installation instructions for more details:Building
To build and install dependencies, run the following commands:Testing
In order to run the full test suite, there are some other requirements. First, a python virtual environment is needed to install the python requirements. We’ll also set the env source now.Deployment
The following section will run through the deployment process of the Forte Rules Engine, as well as how to utilize a local deployment of the FRE. The main deployment script is located atscript/deployment/DeployRulesDiamond.s.sol
.
Environment Configuration
Before deploying, configure your environment variables in the.env
file:
- Set
DEPLOYER_PRIVATE_KEY
to the private key of the account that will deploy the contracts - Set
DESIRED_DEPLOYMENT_ADDRESS
to your preferred deployment address - Set
ETH_RPC_URL
to the RPC endpoint of your target blockchain network - Ensure the deployer account has sufficient funds for gas fees
Local Development with Anvil
For local development and testing, you can use Anvil to create a persistent state: Method 1: Manual Anvil State Creation- Start Anvil in the background with
--dump-state diamondDeployedAnvilState.json
- Deploy the Rules Engine Diamond to the local network
- Save the deployment state to
diamondDeployedAnvilState.json
- Clean up the Anvil process
Deployment Methods
Licensing
The primary license for Forte Protocol Rules Engine is the Business Source License 1.1 (BUSL-1.1
), see LICENSE
. However, some files are dual licensed under GPL-2.0-or-later
:
- All files in
src/example/
may also be licensed underGPL-2.0-or-later
(as indicated in their SPDX headers), seesrc/example/LICENSE
Other Exceptions
- All files in
lib/
are licensed underMIT
(as indicated in its SPDX header), seelib/LICENSE_MIT
- All files in
src/example/
may also be licensed underGPL-2.0-or-later
(as indicated in their SPDX headers), see src/example/LICENSE Other Exceptions