IFrictionlessComplianceFactory
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Interface defining the upgradeable compliance factory for all tokens in the Frictionless protocol.
Functions
setTreasuryManager
Sets the Treasury Manager to be the specified address.
Parameters
Name | Type | Description |
---|---|---|
|
| the address of the treasury manager to set throws |
updateModularComplianceImpl
Updates and upgrades the modular compliance implementation
Parameters
Name | Type | Description |
---|---|---|
|
| the address of the modular compliance implementation |
updateSupportedComplianceData
Updates the set of supported modular compliance modules.
Parameters
Name | Type | Description |
---|---|---|
|
| the set of supported modular compliance modules. |
updateModularComplianceData
Updates the modular compliance data.
Parameters
Name | Type | Description |
---|---|---|
|
| the modular compliance data. |
deployCompliance
Deploys the compliance contract using the ProxyBeacon with the associated FrictionlessPermissionsManager contract
Parameters
Name | Type | Description |
---|---|---|
|
| The Frictionless token type as defined by |
Returns
Name | Type | Description |
---|---|---|
|
| the address of the deployed compliance contract for the specified Frictionless token type throws |
treasuryManager
returns the address of the treasuryManager
Returns
Name | Type | Description |
---|---|---|
|
| the address of the treasuryManager |
modularComplianceBeacon
returns the ProxyBeacon of the ModularCompliance
Returns
Name | Type | Description |
---|---|---|
|
| the ProxyBeacon of the ModularCompliance |
getModularComplianceImpl
returns the address of the ModularCompliance
Returns
Name | Type | Description |
---|---|---|
|
| the address of the ModularCompliance |
getModularComplianceTokenType
returns the FrictionlessTokenTypes
which is bound by the ModularCompliance
Parameters
Name | Type | Description |
---|---|---|
|
| the address of the ModularComplianceImpl |
Returns
Name | Type | Description |
---|---|---|
|
| the address of the ModularCompliance |
getSupportedComplianceModulesCount
returns the amount of supported compliances ModularCompliance for the specified tokenType_
Parameters
Name | Type | Description |
---|---|---|
|
| the type of token as defined by the |
Returns
Name | Type | Description |
---|---|---|
|
| the amount of supported compliances |
getSupportedComplianceModules
returns the array of supported compliances ModularCompliance for the specified tokenType_
Parameters
Name | Type | Description |
---|---|---|
|
| the type of token as defined by the |
Returns
Name | Type | Description |
---|---|---|
|
| the array of supported compliances |
getSupportedComplianceInfo
isSupportedComplianceModule
returns true if the compliance module supports the Frictionless token type, otherwise false
Parameters
Name | Type | Description |
---|---|---|
|
| the type of token as defined by the |
|
| the address of the modular compliance contract to verify |
Returns
Name | Type | Description |
---|---|---|
|
| true if the compliance module supports the Frictionless token type, otherwise false |
isModularCompliance
Returns true if the address provided is a ModularCompliance contract
Parameters
Name | Type | Description |
---|---|---|
|
| the address of the ModularCompliance contract |
Returns
Name | Type | Description |
---|---|---|
|
| true if the address provided is a ModularCompliance contract, otherwise false |
Events
FrictionlessComplianceDeployed
Event emitted upon successful deployment of a compliance contract.
Errors
FrictionlessComplianceFactoryZeroAddr
error thrown if the specified contract address is a zero address, during init
, setTreasuryManager
, and updateModularComplianceImpl
FrictionlessComplianceFactoryNotATreasuryManager
error thrown if the msg.sender
is not the treasury manager during the function deployCompliance
FrictionlessComplianceFactoryNotAModularCompliance
error thrown if the modular compliance is invlaid for hte token type during the function updateModularCompliancesModules
FrictionlessComplianceFactoryInvalidTokenType
error thrown if an invalid tokenType is specified during deployCompliance
FrictionlessComplianceFactoryInvalidModularComplianceData
error thrown if an invalid module is specified during updateModularCompliancesModules
Structs
SupportedComplianceData
ModularComplianceInfo
UpdateModularComplianceData
Structure to represent the update of modular compliance data.
UpdateSupportedComplianceData
Structure to represent the update of modular compliance data for a given token type