These contracts define the compliance layer for permissioned network participants (KYC/AML, Sanctions, PEP screening), the offering rules and the transfer rules for tokens, which ensures transfers are conducted in line with the legal and regulatory guardrails of MiFID II.
The compliance modules are upgradeable and are tied to specific tokens.
Inherits: IModule
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.
The IFrictionlessCompliance is responsible for the compliant transfer of the various Tokens in the Frictionless protocol.
Sets the instance of the IFrictionlessPermissionsManager
to determine permissions for users.
Parameters
Sets the instance of the IFrictionlessComplianceFactory
to determine the compliance module for the protocol.
Parameters
Gets the instance of the IFrictionlessPermissionsManager
to determine permissions for users.
Returns
Gets the instance of the IFrictionlessComplianceFactory
to determine the compliance module for the protocol.
Returns
Verifies if the specified wallet address is a PROTOCOL_TREASURY user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_CUSTODIAN user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_INVESTOR user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_MANAGER user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_CALCULATING_AGENT user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_TRANSFER_AGENT user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_FUND_ACCOUNTANT user.
Parameters
Returns
Verifies if the specified wallet address is a permissioned user in the Frictionless protocol.
Parameters
Returns
verify if the userAddress is permissioned in the Frictionless protocol and has a valid claim
Parameters
Returns
Event emitted during compliance module transfers
throws if specific address is zero.
thrown if the compliance module address is invalid during bindCompliance
and unBindCompliance
thrown if the compliance module address is not approved during bindCompliance
thrown if the compliance module address is already bound, thrown by bindCompliance
thrown if the compliance module address is not already bound during unBindCompliance
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.
Sets the Treasury Manager to be the specified address.
Parameters
Updates and upgrades the modular compliance implementation
Parameters
Updates the set of supported modular compliance modules.
Parameters
Updates the modular compliance data.
Parameters
Deploys the compliance contract using the ProxyBeacon with the associated FrictionlessPermissionsManager contract
Parameters
Returns
returns the address of the treasuryManager
Returns
returns the ProxyBeacon of the ModularCompliance
Returns
returns the address of the ModularCompliance
Returns
returns the FrictionlessTokenTypes
which is bound by the ModularCompliance
Parameters
Returns
returns the amount of supported compliances ModularCompliance for the specified tokenType_
Parameters
Returns
returns the array of supported compliances ModularCompliance for the specified tokenType_
Parameters
Returns
returns true if the compliance module supports the Frictionless token type, otherwise false
Parameters
Returns
Returns true if the address provided is a ModularCompliance contract
Parameters
Returns
Event emitted upon successful deployment of a compliance contract.
error thrown if the specified contract address is a zero address, during init
, setTreasuryManager
, and updateModularComplianceImpl
error thrown if the msg.sender
is not the treasury manager during the function deployCompliance
error thrown if the modular compliance is invlaid for hte token type during the function updateModularCompliancesModules
error thrown if an invalid tokenType is specified during deployCompliance
error thrown if an invalid module is specified during updateModularCompliancesModules
Structure to represent the update of modular compliance data.
Structure to represent the update of modular compliance data for a given token type
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
frictionlessPermissionsManager_
address
the address of the IFrictionlessPermissionsManager
contract
newComplianceFactory_
address
the address of the IFrictionlessComplianceFactory
contract
<none>
IFrictionlessPermissionsManager
the address of the IFrictionlessPermissionsManager
contract
<none>
IFrictionlessComplianceFactory
the address of the IFrictionlessComplianceFactory
contract
walletAddress_
address
the address of the users wallet.
<none>
bool
true if the specified wallet address is a PROTOCOL_TREASURY user, otherwise false
walletAddress_
address
the address of the users wallet.
<none>
bool
true if the specified wallet address is a PERMISSIONED_CUSTODIAN user, otherwise false
walletAddress_
address
the address of the users wallet.
<none>
bool
true if the specified wallet address is a PERMISSIONED_INVESTOR user, otherwise false
walletAddress_
address
the address of the users wallet.
<none>
bool
true if the specified wallet address is a PERMISSIONED_MANAGER user, otherwise false
walletAddress_
address
the address of the users wallet.
<none>
bool
true if the specified wallet address is a PERMISSIONED_CALCULATING_AGENT user, otherwise false
walletAddress_
address
the address of the users wallet.
<none>
bool
true if the specified wallet address is a PERMISSIONED_TRANSFER_AGENT user, otherwise false
walletAddress_
address
the address of the users wallet.
<none>
bool
true if the specified wallet address is a PERMISSIONED_FUND_ACCOUNTANT user, otherwise false
walletAddress_
address
the address of the users wallet.
<none>
bool
true if the specified wallet address is a permissioned user in the Frictionless protocol, otherwise false
userAddress_
address
the address of the user's wallet to verify
userType_
IFrictionlessPermissionsManager.FrictionlessPermissionedUser
the type of the user as per the enum
<none>
bool
true if a valid permissioned user and has a valid claim, otherwise false.
|
| the address of the treasury manager to set throws |
|
| the address of the modular compliance implementation |
|
| the set of supported modular compliance modules. |
|
| the modular compliance data. |
|
| The Frictionless token type as defined by |
|
| the address of the deployed compliance contract for the specified Frictionless token type throws |
|
| the address of the treasuryManager |
|
| the ProxyBeacon of the ModularCompliance |
|
| the address of the ModularCompliance |
|
| the address of the ModularComplianceImpl |
|
| the address of the ModularCompliance |
|
| the type of token as defined by the |
|
| the amount of supported compliances |
|
| the type of token as defined by the |
|
| the array of supported compliances |
|
| the type of token as defined by the |
|
| the address of the modular compliance contract to verify |
|
| true if the compliance module supports the Frictionless token type, otherwise false |
|
| the address of the ModularCompliance contract |
|
| true if the address provided is a ModularCompliance contract, otherwise false |
Inherits: IModularCompliance
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.
The IFrictionlessModularCompliance is responsible for the compliant transfer of the various Tokens in the Frictionless protocol.
Initializes the modular compliance, sets the maximum allowable modules per token and adds the modules provided
Parameters
Set the maximum number of allowable modules which can be bound.
Parameters
Adds modules based on the array of module addresses provided
Parameters
Removes modules based on the array of module addresses provided
Parameters
Returns the maximum number of allowable modules which can be bound.
Returns
Emitted during updateMaxModulesCount
to inform of new modules max count updates
Emitted during addModules
to inform of new modules added
Emitted during removeModules
to inform of modules removed
thrown if specific address is zero.
thrown if an attempt to set the maximum number of allowable modules to zero is made in updateMaxModulesCount
thrown if an attempt to add an already existing module during addModules
thrown if module for the given address is not already bound by the modifier onlyExistingModule
thrown if an attempt to add more than the allowable modules during addModules
thrown during bindToken
or unBindToken
if the caller is not the owner or the bound token address
thrown if the the msg.sender is not the bound token address during modifier onlyToken
Inherits: IFrictionlessComplianceModule, OwnableUpgradeable
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.
See {IFrictionlessComplianceModule}
The IFrictionlessPermissionsManager for the protocol.
The IFrictionlessComplianceFactory for the protocol.
the mapping of compliance modules bound.
modifier used to very that only approved compliance modules can be used.
modifier used to very that only modules that are bound, can be used.
Initiatizes the compliance module
Parameters
Sets the instance of the IFrictionlessPermissionsManager
to determine permissions for users.
Parameters
Sets the instance of the IFrictionlessComplianceFactory
to determine the compliance module for the protocol.
Parameters
Verifies if the specified wallet address is a PROTOCOL_TREASURY user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_CUSTODIAN user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_INVESTOR user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_MANAGER user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_CALCULATING_AGENT user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_TRANSFER_AGENT user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_FUND_ACCOUNTANT user.
Parameters
Returns
Verifies if the specified wallet address is a permissioned user in the Frictionless protocol.
Parameters
Returns
verify if the userAddress is permissioned in the Frictionless protocol and has a valid claim
Parameters
Returns
Impl of the setting of the permissions manager
Impl of the setting of the compliance factory
Verifies if an address is a zero address
Verifies if the compliance_ address supplied is bound as per the mapping
Verifies if the compliance_ address supplied is valid
Verifies if the msg.sender
is a valid modular compliance
Returns the address of the IToken bound by this compliance
Determine if a claim is present for a given userAddress and userType
Parameters
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
modules_
address[]
the array of module addresses to be added
maxModulesCount_
uint256
maximum number of allowable modules which can be bound. throws FrictionlessModularComplianceMaxModuleCountReached
if the maximum amount of modules has been reached as per the maxModulesCount throws FrictionlessModularComplianceModuleIsAlreadyBound
if the module is already bound throws FrictionlessIsZeroAddress
if the module address is a zero address throws FrictionlessModularComplianceZeroMaxModulesCount
if an attempt to set the maximum number of allowable modules to zero is made in updateMaxModulesCount
emits ModulesAdded upon sucessful addition emits MaxModulesCountUpdated
upon successful update of the maximum modules count.
newMaxModulesCount_
uint256
maximum number of allowable modules which can be bound. throws FrictionlessModularComplianceZeroMaxModulesCount
if an attempt to set the maximum number of allowable modules to zero is made in updateMaxModulesCount
emits MaxModulesCountUpdated
upon successful update of the maximum modules count.
modulesToAdd_
address[]
the array of module addresses to be added throws FrictionlessModularComplianceMaxModuleCountReached
if the maximum amount of modules has been reached as per the maxModulesCount throws FrictionlessModularComplianceModuleIsAlreadyBound
if the module is already bound throws FrictionlessIsZeroAddress
if the module address is a zero address emits ModulesAdded upon sucessful addition
modulesToRemove_
address[]
the array of module addresses to be removed throws FrictionlessModularComplianceModuleDoesNotExist
if module for the given address is not already bound emits ModulesRemoved upon sucessful removal
<none>
uint256
maximum number of allowable modules which can be bound.
frictionlessPermissionsManager_
address
the address of the frictionless permissions manager
complianceFactory_
address
the address of the compliance dfactory
frictionlessPermissionsManager_
address
the address of the IFrictionlessPermissionsManager
contract
newComplianceFactory_
address
the address of the IFrictionlessComplianceFactory
contract
userAddress_
address
<none>
bool
true if the specified wallet address is a PROTOCOL_TREASURY user, otherwise false
userAddress_
address
<none>
bool
true if the specified wallet address is a PERMISSIONED_CUSTODIAN user, otherwise false
userAddress_
address
<none>
bool
true if the specified wallet address is a PERMISSIONED_INVESTOR user, otherwise false
userAddress_
address
<none>
bool
true if the specified wallet address is a PERMISSIONED_MANAGER user, otherwise false
userAddress_
address
<none>
bool
true if the specified wallet address is a PERMISSIONED_CALCULATING_AGENT user, otherwise false
userAddress_
address
<none>
bool
true if the specified wallet address is a PERMISSIONED_TRANSFER_AGENT user, otherwise false
userAddress_
address
<none>
bool
true if the specified wallet address is a PERMISSIONED_FUND_ACCOUNTANT user, otherwise false
userAddress_
address
<none>
bool
true if the specified wallet address is a permissioned user in the Frictionless protocol, otherwise false
userAddress_
address
the address of the user's wallet to verify
userType_
IFrictionlessPermissionsManager.FrictionlessPermissionedUser
the type of the user as per the enum
<none>
bool
true if a valid permissioned user and has a valid claim, otherwise false.
userAddress_
address
the address if the users wallet
userType_
IFrictionlessPermissionsManager.FrictionlessPermissionedUser
the type of the user as defined by the enumeration IFrictionlessPermissionsManager.FrictionlessPermissionedUser