Forte Rules Engine Reference v2.1.0
Reference documentation for the Forte Rules Engine
Forte Rules Engine
This repository contains an EVM-based protocol designed to meet the unique needs of tokenized assets and on-chain economies. The protocol enables the creation and management of economic and compliance controls for your on-chain economy at the token level, allowing for maximum flexibility while maintaining the transparency and trustlessness of Web3.
Installation
To install the package, run the following command in the root of your project:
Dependencies
This package requires the following:
-
Foundry
NOTE: In order to ensure full support, run this command to get the correct Foundry version:
-
Scripting Requirements
eth-abi 5.1.0
jq 1.6.0
python-dotenv 1.0.1
These packages can be installed manually or through the following helper command:
-
@openzeppelin/contracts
version 4.9.6 and@openzeppelin/contracts-upgradeable
version 4.9.6.If the contracts show any compiling errors, try to manually update the version of the existing openzeppelin library in your project by doing:
Usage
User Guides
For complete usage information and documentation, please visit the User Guide.
Example Application
To deploy the Forte Rules Engine and an example application, perform the following steps:
- Deploy the Forte Rules Engine locally.
- Deploy the Example Application locally.
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), see Example LICENSE
Other Exceptions
- All files in
lib/
are licensed underMIT
(as indicated in its SPDX header), see LICENSE_MIT - All files in
src/example/
may also be licensed underGPL-2.0-or-later
(as indicated in their SPDX headers), see Example LICENSE Other Exceptions - All files in
contracts/test
remain unlicensed (as indicated in their SPDX headers).
Referece Docs Table of Contents
- Home
- ❱ client
- ❱ application
- ❱ common
- ❱ pricing
- ❱ token
- ❱ ERC20
- ❱ ERC721
- ❱ handler
- ❱ common
- ❱ diamond
- ERC20HandlerMainFacet
- ERC20NonTaggedRuleFacet
- ERC20TaggedRuleFacet
- ERC721HandlerMainFacet
- ERC721NonTaggedRuleFacet
- ERC721TaggedRuleFacet
- FacetsCommonImports
- FeesFacet
- FunctionNotFound
- FacetHasNoCodeOrHasBeenDestroyed
- HandlerDiamondArgs
- HandlerDiamond
- NoSelectorsGivenToAdd
- NotContractOwner
- NoSelectorsProvidedForFacetForCut
- CannotAddSelectorsToZeroAddress
- NoBytecodeAtAddress
- IncorrectFacetCutAction
- CannotAddFunctionToDiamondThatAlreadyExists
- CannotReplaceFunctionsFromFacetWithZeroAddress
- CannotReplaceImmutableFunction
- CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet
- CannotReplaceFunctionThatDoesNotExists
- RemoveFacetAddressMustBeZeroAddress
- CannotRemoveFunctionThatDoesNotExist
- CannotRemoveImmutableFunction
- InitializationFunctionReverted
- FacetAddressAndSelectorPosition
- HandlerDiamondStorage
- HandlerDiamondLib
- HandlerVersionFacet
- IHandlerDiamond
- Fee
- FeeS
- TokenMinTxSizeS
- AccountApproveDenyOracleS
- AccountMaxTradeSizeS
- TokenMaxBuySellVolumeS
- AccountMinMaxTokenBalanceHandlerS
- HandlerBaseS
- TokenMaxSupplyVolatilityS
- TokenMaxTradingVolumeS
- TokenMaxDailyTradesS
- TokenMinHoldTime
- TokenMinHoldTimeS
- NFTValuationLimitS
- InitializedS
- HandlerVersionS
- StorageLib
- TradingRuleFacet
- ❱ ruleContracts
- Fees
- HandlerAccountApproveDenyOracle
- HandlerAccountApproveDenyOracle constants
- HandlerAccountMaxTradeSize
- HandlerAccountMinMaxTokenBalance
- HandlerBase
- HandlerRuleContractsCommonImports
- HandlerTokenMaxBuySellVolume
- HandlerTokenMaxDailyTrades
- HandlerTokenMaxSupplyVolatility
- HandlerTokenMaxTradingVolume
- HandlerTokenMinHoldTime
- HandlerTokenMinTxSize
- NFTValuationLimit
- HandlerTypes
- IProtocolToken
- IProtocolTokenHandler
- IToken
- ProtocolTokenCommon
- ProtocolTokenCommonU
- ❱ common
- ActionTypes
- IERC721Errors
- IHandlerDiamondErrors
- IRuleProcessorErrors
- IAccessLevelErrors
- IPauseRuleErrors
- IRiskErrors
- IERC20Errors
- IMaxTagLimitError
- ITagRuleErrors
- IInputErrors
- IAppRuleInputErrors
- IRiskInputErrors
- ITagInputErrors
- ITagRuleInputErrors
- IPermissionModifierErrors
- INoAddressToRemove
- IAppManagerErrors
- AMMCalculatorErrors
- AMMErrors
- NFTPricingErrors
- IStakingErrors
- IERC721StakingErrors
- IProtocolERC20Errors
- IZeroAddressError
- IAssetHandlerErrors
- IFeesErrors
- IOwnershipErrors
- IAppHandlerErrors
- IAppLevelEvents
- IAppManagerAddressSet
- IOracleEvents
- IApplicationHandlerEvents
- ICommonApplicationHandlerEvents
- IRuleProcessorDiamondEvents
- IEconomicEvents
- IHandlerDiamondEvents
- ITokenHandlerEvents
- IApplicationEvents
- ITokenEvents
- IIntegrationEvents
- IOracle
- IProtocolERC20Pricing
- IProtocolERC721Pricing
- ❱ example
- ❱ protocol
- ❱ diamond
- ❱ economic
- ❱ ruleProcessor
- AppRuleDataFacet
- ApplicationAccessLevelProcessorFacet
- ApplicationPauseProcessorFacet
- ApplicationRiskProcessorFacet
- ERC20RuleProcessorFacet
- ERC20TaggedRuleProcessorFacet
- ERC721RuleProcessorFacet
- ERC721TaggedRuleProcessorFacet
- IRuleStorage
- RuleApplicationValidationFacet
- ORACLE_TYPE
- RuleCodeData constants
- RuleDataFacet
- INonTaggedRules
- ITaggedRules
- IFeeRules
- IApplicationRules
- RuleProcessorCommonLib
- FunctionNotFound
- FacetHasNoCodeOrHasBeenDestroyed
- RuleProcessorDiamondArgs
- RuleProcessorDiamond
- RuleProcessorDiamondImports
- NoSelectorsGivenToAdd
- NotContractOwner
- NoSelectorsProvidedForFacetForCut
- CannotAddSelectorsToZeroAddress
- NoBytecodeAtAddress
- IncorrectFacetCutAction
- CannotAddFunctionToDiamondThatAlreadyExists
- CannotReplaceFunctionsFromFacetWithZeroAddress
- CannotReplaceImmutableFunction
- CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet
- CannotReplaceFunctionThatDoesNotExists
- RemoveFacetAddressMustBeZeroAddress
- CannotRemoveFunctionThatDoesNotExist
- CannotRemoveImmutableFunction
- InitializationFunctionReverted
- FacetAddressAndSelectorPosition
- RuleProcessorDiamondStorage
- RuleDataStorage
- RuleProcessorDiamondLib
- RuleStoragePositionLib
- TaggedRuleDataFacet
- AppAdministratorOnly
- AppAdministratorOnlyU
- AppAdministratorOrOwnerOnly
- IRuleProcessor
- RuleAdministratorOnly
- ❱ ruleProcessor
- ❱ client