arrow-left

All pages
gitbookPowered by GitBook
1 of 5

Loading...

Loading...

Loading...

Loading...

Loading...

Compliance

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.

IFrictionlessModularCompliance

Git Sourcearrow-up-right

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.

hashtag
Functions

hashtag
init

Initializes the modular compliance, sets the maximum allowable modules per token and adds the modules provided

Parameters

Name
Type
Description

hashtag
updateMaxModulesCount

Set the maximum number of allowable modules which can be bound.

Parameters

Name
Type
Description

hashtag
addModules

Adds modules based on the array of module addresses provided

Parameters

Name
Type
Description

hashtag
removeModules

Removes modules based on the array of module addresses provided

Parameters

Name
Type
Description

hashtag
maxModulesCount

Returns the maximum number of allowable modules which can be bound.

Returns

Name
Type
Description

hashtag
Events

hashtag
MaxModulesCountUpdated

Emitted during updateMaxModulesCount to inform of new modules max count updates

hashtag
ModulesAdded

Emitted during addModules to inform of new modules added

hashtag
ModulesRemoved

Emitted during removeModules to inform of modules removed

hashtag
Errors

hashtag
FrictionlessIsZeroAddress

thrown if specific address is zero.

hashtag
FrictionlessModularComplianceZeroMaxModulesCount

thrown if an attempt to set the maximum number of allowable modules to zero is made in updateMaxModulesCount

hashtag
FrictionlessModularComplianceModuleIsAlreadyBound

thrown if an attempt to add an already existing module during addModules

hashtag
FrictionlessModularComplianceModuleDoesNotExist

thrown if module for the given address is not already bound by the modifier onlyExistingModule

hashtag
FrictionlessModularComplianceMaxModuleCountReached

thrown if an attempt to add more than the allowable modules during addModules

hashtag
FrictionlessModularComplianceCallerNotATokenOrOwner

thrown during bindToken or unBindToken if the caller is not the owner or the bound token address

hashtag
FrictionlessModularComplianceCallerNotAToken

thrown if the the msg.sender is not the bound token address during modifier onlyToken

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.

function init(address[] calldata modules_, uint256 maxModulesCount_) external;
function updateMaxModulesCount(uint256 newMaxModulesCount_) external;
function addModules(address[] calldata modulesToAdd_) external;
function removeModules(address[] calldata modulesToRemove_) external;
function maxModulesCount() external view returns (uint256);
event MaxModulesCountUpdated(uint256 newMaxModulesCount, uint256 oldMaxModulesCount);
event ModulesAdded(address[] modules);
event ModulesRemoved(address[] modules);
error FrictionlessIsZeroAddress(string);
error FrictionlessModularComplianceZeroMaxModulesCount();
error FrictionlessModularComplianceModuleIsAlreadyBound(address module);
error FrictionlessModularComplianceModuleDoesNotExist(address module);
error FrictionlessModularComplianceMaxModuleCountReached();
error FrictionlessModularComplianceCallerNotATokenOrOwner(address caller);
error FrictionlessModularComplianceCallerNotAToken(address caller);

IFrictionlessComplianceFactory

Git Sourcearrow-up-right

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.

hashtag
Functions

hashtag
setTreasuryManager

Sets the Treasury Manager to be the specified address.

Parameters

Name
Type
Description

hashtag
updateModularComplianceImpl

Updates and upgrades the modular compliance implementation

Parameters

Name
Type
Description

hashtag
updateSupportedComplianceData

Updates the set of supported modular compliance modules.

Parameters

Name
Type
Description

hashtag
updateModularComplianceData

Updates the modular compliance data.

Parameters

Name
Type
Description

hashtag
deployCompliance

Deploys the compliance contract using the ProxyBeacon with the associated FrictionlessPermissionsManager contract

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
treasuryManager

returns the address of the treasuryManager

Returns

Name
Type
Description

hashtag
modularComplianceBeacon

returns the ProxyBeacon of the ModularCompliance

Returns

Name
Type
Description

hashtag
getModularComplianceImpl

returns the address of the ModularCompliance

Returns

Name
Type
Description

hashtag
getModularComplianceTokenType

returns the FrictionlessTokenTypes which is bound by the ModularCompliance

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
getSupportedComplianceModulesCount

returns the amount of supported compliances ModularCompliance for the specified tokenType_

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
getSupportedComplianceModules

returns the array of supported compliances ModularCompliance for the specified tokenType_

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
getSupportedComplianceInfo

hashtag
isSupportedComplianceModule

returns true if the compliance module supports the Frictionless token type, otherwise false

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
isModularCompliance

Returns true if the address provided is a ModularCompliance contract

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
Events

hashtag
FrictionlessComplianceDeployed

Event emitted upon successful deployment of a compliance contract.

hashtag
Errors

hashtag
FrictionlessComplianceFactoryZeroAddr

error thrown if the specified contract address is a zero address, during init, setTreasuryManager, and updateModularComplianceImpl

hashtag
FrictionlessComplianceFactoryNotATreasuryManager

error thrown if the msg.sender is not the treasury manager during the function deployCompliance

hashtag
FrictionlessComplianceFactoryNotAModularCompliance

error thrown if the modular compliance is invlaid for hte token type during the function updateModularCompliancesModules

hashtag
FrictionlessComplianceFactoryInvalidTokenType

error thrown if an invalid tokenType is specified during deployCompliance

hashtag
FrictionlessComplianceFactoryInvalidModularComplianceData

error thrown if an invalid module is specified during updateModularCompliancesModules

hashtag
Structs

hashtag
SupportedComplianceData

hashtag
ModularComplianceInfo

hashtag
UpdateModularComplianceData

Structure to represent the update of modular compliance data.

hashtag
UpdateSupportedComplianceData

Structure to represent the update of modular compliance data for a given token type

IFrictionlessComplianceModule

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.

newTreasuryManager_

address

the address of the treasury manager to set throws FrictionlessComplianceFactoryZeroAddress if the newTreasuryManager_ is a zero address

newModularComplianceImpl_

address

the address of the modular compliance implementation

updateSupportedComplianceDataArr_

UpdateSupportedComplianceData[]

the set of supported modular compliance modules.

updateModularComplianceDataArr_

UpdateModularComplianceData[]

the modular compliance data.

tokenType_

IBasicFrictionlessToken.FrictionlessTokenTypes

The Frictionless token type as defined by IBasicFrictionlessToken.FrictionlessTokenTypes

<none>

address

the address of the deployed compliance contract for the specified Frictionless token type throws FrictionlessComplianceFactoryNotATreasuryManager if the msg.sender is not the treasury manager emits FrictionlessComplianceDeployed event upon successful deployment of the compliance contract.

<none>

address

the address of the treasuryManager

<none>

ProxyBeacon

the ProxyBeacon of the ModularCompliance

<none>

address

the address of the ModularCompliance

modularComplianceAddr_

address

the address of the ModularComplianceImpl

<none>

IBasicFrictionlessToken.FrictionlessTokenTypes

the address of the ModularCompliance

tokenType_

IBasicFrictionlessToken.FrictionlessTokenTypes

the type of token as defined by the IBasicFrictionlessToken.FrictionlessTokenTypes enumerated type

<none>

uint256

the amount of supported compliances

tokenType_

IBasicFrictionlessToken.FrictionlessTokenTypes

the type of token as defined by the IBasicFrictionlessToken.FrictionlessTokenTypes enumerated type

<none>

address[]

the array of supported compliances

tokenType_

IBasicFrictionlessToken.FrictionlessTokenTypes

the type of token as defined by the IBasicFrictionlessToken.FrictionlessTokenTypes enumerated type

moduleToCheck_

address

the address of the modular compliance contract to verify

<none>

bool

true if the compliance module supports the Frictionless token type, otherwise false

modularComplianceAddr_

address

the address of the ModularCompliance contract

<none>

bool

true if the address provided is a ModularCompliance contract, otherwise false

The IFrictionlessCompliance is responsible for the compliant transfer of the various Tokens in the Frictionless protocol.

hashtag
Functions

hashtag
setPermissionsManager

Sets the instance of the IFrictionlessPermissionsManager to determine permissions for users.

Parameters

Name
Type
Description

frictionlessPermissionsManager_

address

the address of the IFrictionlessPermissionsManager contract

hashtag
setComplianceFactory

Sets the instance of the IFrictionlessComplianceFactory to determine the compliance module for the protocol.

Parameters

Name
Type
Description

newComplianceFactory_

address

the address of the IFrictionlessComplianceFactory contract

hashtag
permissionsManager

Gets the instance of the IFrictionlessPermissionsManager to determine permissions for users.

Returns

Name
Type
Description

<none>

IFrictionlessPermissionsManager

the address of the IFrictionlessPermissionsManager contract

hashtag
complianceFactory

Gets the instance of the IFrictionlessComplianceFactory to determine the compliance module for the protocol.

Returns

Name
Type
Description

<none>

IFrictionlessComplianceFactory

the address of the IFrictionlessComplianceFactory contract

hashtag
isTreasury

Verifies if the specified wallet address is a PROTOCOL_TREASURY user.

Parameters

Name
Type
Description

walletAddress_

address

the address of the users wallet.

Returns

Name
Type
Description

<none>

bool

true if the specified wallet address is a PROTOCOL_TREASURY user, otherwise false

hashtag
isCustodian

Verifies if the specified wallet address is a PERMISSIONED_CUSTODIAN user.

Parameters

Name
Type
Description

walletAddress_

address

the address of the users wallet.

Returns

Name
Type
Description

<none>

bool

true if the specified wallet address is a PERMISSIONED_CUSTODIAN user, otherwise false

hashtag
isInvestor

Verifies if the specified wallet address is a PERMISSIONED_INVESTOR user.

Parameters

Name
Type
Description

walletAddress_

address

the address of the users wallet.

Returns

Name
Type
Description

<none>

bool

true if the specified wallet address is a PERMISSIONED_INVESTOR user, otherwise false

hashtag
isManager

Verifies if the specified wallet address is a PERMISSIONED_MANAGER user.

Parameters

Name
Type
Description

walletAddress_

address

the address of the users wallet.

Returns

Name
Type
Description

<none>

bool

true if the specified wallet address is a PERMISSIONED_MANAGER user, otherwise false

hashtag
isCalculatingAgent

Verifies if the specified wallet address is a PERMISSIONED_CALCULATING_AGENT user.

Parameters

Name
Type
Description

walletAddress_

address

the address of the users wallet.

Returns

Name
Type
Description

<none>

bool

true if the specified wallet address is a PERMISSIONED_CALCULATING_AGENT user, otherwise false

hashtag
isTransferAgent

Verifies if the specified wallet address is a PERMISSIONED_TRANSFER_AGENT user.

Parameters

Name
Type
Description

walletAddress_

address

the address of the users wallet.

Returns

Name
Type
Description

<none>

bool

true if the specified wallet address is a PERMISSIONED_TRANSFER_AGENT user, otherwise false

hashtag
isFundAccountant

Verifies if the specified wallet address is a PERMISSIONED_FUND_ACCOUNTANT user.

Parameters

Name
Type
Description

walletAddress_

address

the address of the users wallet.

Returns

Name
Type
Description

<none>

bool

true if the specified wallet address is a PERMISSIONED_FUND_ACCOUNTANT user, otherwise false

hashtag
isUser

Verifies if the specified wallet address is a permissioned user in the Frictionless protocol.

Parameters

Name
Type
Description

walletAddress_

address

the address of the users wallet.

Returns

Name
Type
Description

<none>

bool

true if the specified wallet address is a permissioned user in the Frictionless protocol, otherwise false

hashtag
hasClaim

verify if the userAddress is permissioned in the Frictionless protocol and has a valid claim

Parameters

Name
Type
Description

userAddress_

address

the address of the user's wallet to verify

userType_

IFrictionlessPermissionsManager.FrictionlessPermissionedUser

the type of the user as per the enum

Returns

Name
Type
Description

<none>

bool

true if a valid permissioned user and has a valid claim, otherwise false.

hashtag
Events

hashtag
FrictionlessTokenTransferred

Event emitted during compliance module transfers

hashtag
Errors

hashtag
FrictionlessIsZeroAddress

throws if specific address is zero.

hashtag
FrictionlessComplianceModuleInvalidCompliance

thrown if the compliance module address is invalid during bindCompliance and unBindCompliance

hashtag
FrictionlessComplianceModuleNotAnApprovedCompliance

thrown if the compliance module address is not approved during bindCompliance

hashtag
FrictionlessComplianceModuleComplianceIsAlreadyBound

thrown if the compliance module address is already bound, thrown by bindCompliance

hashtag
FrictionlessComplianceModuleNotABoundCompliance

thrown if the compliance module address is not already bound during unBindCompliance

Git Sourcearrow-up-right
function setTreasuryManager(address newTreasuryManager_) external;
function updateModularComplianceImpl(address newModularComplianceImpl_) external;
function updateSupportedComplianceData(UpdateSupportedComplianceData[] calldata updateSupportedComplianceDataArr_)
    external;
function updateModularComplianceData(UpdateModularComplianceData[] calldata updateModularComplianceDataArr_) external;
function deployCompliance(IBasicFrictionlessToken.FrictionlessTokenTypes tokenType_) external returns (address);
function treasuryManager() external view returns (address);
function modularComplianceBeacon() external view returns (ProxyBeacon);
function getModularComplianceImpl() external view returns (address);
function getModularComplianceTokenType(address modularComplianceAddr_)
    external
    view
    returns (IBasicFrictionlessToken.FrictionlessTokenTypes);
function getSupportedComplianceModulesCount(IBasicFrictionlessToken.FrictionlessTokenTypes tokenType_)
    external
    view
    returns (uint256);
function getSupportedComplianceModules(IBasicFrictionlessToken.FrictionlessTokenTypes tokenType_)
    external
    view
    returns (address[] memory);
function getSupportedComplianceInfo(IBasicFrictionlessToken.FrictionlessTokenTypes tokenType_)
    external
    view
    returns (ModularComplianceInfo memory);
function isSupportedComplianceModule(IBasicFrictionlessToken.FrictionlessTokenTypes tokenType_, address moduleToCheck_)
    external
    view
    returns (bool);
function isModularCompliance(address modularComplianceAddr_) external view returns (bool);
event FrictionlessComplianceDeployed(
    IBasicFrictionlessToken.FrictionlessTokenTypes indexed tokenType, address newComplianceContract
);
error FrictionlessComplianceFactoryZeroAddr(string);
error FrictionlessComplianceFactoryNotATreasuryManager(address);
error FrictionlessComplianceFactoryNotAModularCompliance(address);
error FrictionlessComplianceFactoryInvalidTokenType();
error FrictionlessComplianceFactoryInvalidModularComplianceData(UpdateModularComplianceData modularComplianceData);
struct SupportedComplianceData {
    uint256 maxModulesCount;
    EnumerableSet.AddressSet modules;
    bytes32[48] _gap;
}
struct ModularComplianceInfo {
    uint256 maxModulesCount;
    address[] modules;
}
struct UpdateModularComplianceData {
    address modularCompliance;
    ModularComplianceInfo complianceInfo;
    bool isAdding;
}
struct UpdateSupportedComplianceData {
    IBasicFrictionlessToken.FrictionlessTokenTypes tokenType;
    ModularComplianceInfo complianceInfo;
    bool isAdding;
}
function setPermissionsManager(address frictionlessPermissionsManager_) external;
function setComplianceFactory(address newComplianceFactory_) external;
function permissionsManager() external view returns (IFrictionlessPermissionsManager);
function complianceFactory() external view returns (IFrictionlessComplianceFactory);
function isTreasury(address walletAddress_) external view returns (bool);
function isCustodian(address walletAddress_) external view returns (bool);
function isInvestor(address walletAddress_) external view returns (bool);
function isManager(address walletAddress_) external view returns (bool);
function isCalculatingAgent(address walletAddress_) external view returns (bool);
function isTransferAgent(address walletAddress_) external view returns (bool);
function isFundAccountant(address walletAddress_) external view returns (bool);
function isUser(address walletAddress_) external view returns (bool);
function hasClaim(address userAddress_, IFrictionlessPermissionsManager.FrictionlessPermissionedUser userType_)
    external
    view
    returns (bool);
event FrictionlessTokenTransferred(
    IBasicFrictionlessToken.FrictionlessTokenTypes tokenType,
    address tokenAddr,
    address from,
    address to,
    uint256 amount
);
error FrictionlessIsZeroAddress(string);
error FrictionlessComplianceModuleInvalidCompliance(address compliance);
error FrictionlessComplianceModuleNotAnApprovedCompliance(address compliance);
error FrictionlessComplianceModuleComplianceIsAlreadyBound(address compliance);
error FrictionlessComplianceModuleNotABoundCompliance(address compliance);

AbstractFrictionlessComplianceModule

Git Sourcearrow-up-right

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}

hashtag
State Variables

hashtag
permissionsManager

The IFrictionlessPermissionsManager for the protocol.

hashtag
complianceFactory

The IFrictionlessComplianceFactory for the protocol.

hashtag
_complianceBound

the mapping of compliance modules bound.

hashtag
Functions

hashtag
onlyApprovedCompliance

modifier used to very that only approved compliance modules can be used.

hashtag
onlyBoundCompliance

modifier used to very that only modules that are bound, can be used.

hashtag
__AbstractFrictionlessComplianceModule_init

Initiatizes the compliance module

Parameters

Name
Type
Description

hashtag
setPermissionsManager

Sets the instance of the IFrictionlessPermissionsManager to determine permissions for users.

Parameters

Name
Type
Description

hashtag
setComplianceFactory

Sets the instance of the IFrictionlessComplianceFactory to determine the compliance module for the protocol.

Parameters

Name
Type
Description

hashtag
bindCompliance

hashtag
unbindCompliance

hashtag
moduleTransferAction

hashtag
moduleMintAction

hashtag
moduleBurnAction

hashtag
moduleCheck

hashtag
isComplianceBound

hashtag
isTreasury

Verifies if the specified wallet address is a PROTOCOL_TREASURY user.

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
isCustodian

Verifies if the specified wallet address is a PERMISSIONED_CUSTODIAN user.

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
isInvestor

Verifies if the specified wallet address is a PERMISSIONED_INVESTOR user.

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
isManager

Verifies if the specified wallet address is a PERMISSIONED_MANAGER user.

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
isCalculatingAgent

Verifies if the specified wallet address is a PERMISSIONED_CALCULATING_AGENT user.

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
isTransferAgent

Verifies if the specified wallet address is a PERMISSIONED_TRANSFER_AGENT user.

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
isFundAccountant

Verifies if the specified wallet address is a PERMISSIONED_FUND_ACCOUNTANT user.

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
isUser

Verifies if the specified wallet address is a permissioned user in the Frictionless protocol.

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
hasClaim

verify if the userAddress is permissioned in the Frictionless protocol and has a valid claim

Parameters

Name
Type
Description

Returns

Name
Type
Description

hashtag
_setPermissionsManager

Impl of the setting of the permissions manager

hashtag
_setComplianceFactory

Impl of the setting of the compliance factory

hashtag
_checkZeroAddr

Verifies if an address is a zero address

hashtag
_onlyBoundCompliance

Verifies if the compliance_ address supplied is bound as per the mapping

hashtag
_onlyValidCompliance

Verifies if the compliance_ address supplied is valid

hashtag
_onlyApprovedCompliance

Verifies if the msg.sender is a valid modular compliance

hashtag
_getTokenBound

Returns the address of the IToken bound by this compliance

hashtag
_hasClaim

Determine if a claim is present for a given userAddress and userType

Parameters

Name
Type
Description

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

IFrictionlessPermissionsManager public override permissionsManager;
IFrictionlessComplianceFactory public override complianceFactory;
mapping(address => bool) private _complianceBound;
modifier onlyApprovedCompliance();
modifier onlyBoundCompliance();
function __AbstractFrictionlessComplianceModule_init(
    address frictionlessPermissionsManager_,
    address complianceFactory_
) internal onlyInitializing;
function setPermissionsManager(address frictionlessPermissionsManager_) external override onlyOwner;
function setComplianceFactory(address newComplianceFactory_) external override onlyOwner;
function bindCompliance(address compliance_) external override onlyApprovedCompliance;
function unbindCompliance(address compliance_) external override;
function moduleTransferAction(address from_, address to_, uint256 value_)
    external
    virtual
    override
    onlyBoundCompliance;
function moduleMintAction(address to_, uint256 value_) external virtual override onlyBoundCompliance;
function moduleBurnAction(address from_, uint256 value_) external virtual override onlyBoundCompliance;
function moduleCheck(address, address, uint256, address) public view virtual override returns (bool);
function isComplianceBound(address compliance_) public view override returns (bool);
function isTreasury(address userAddress_) public view override returns (bool);
function isCustodian(address userAddress_) public view override returns (bool);
function isInvestor(address userAddress_) public view override returns (bool);
function isManager(address userAddress_) public view override returns (bool);
function isCalculatingAgent(address userAddress_) public view override returns (bool);
function isTransferAgent(address userAddress_) public view override returns (bool);
function isFundAccountant(address userAddress_) public view override returns (bool);
function isUser(address userAddress_) public view override returns (bool);
function hasClaim(address userAddress_, IFrictionlessPermissionsManager.FrictionlessPermissionedUser userType_)
    public
    view
    override
    returns (bool);
function _setPermissionsManager(address newFrictionlessPermissionsManager_) internal;
function _setComplianceFactory(address newComplianceFactory_) internal;
function _checkZeroAddr(address addrToCheck_, string memory addrName_) internal pure;
function _onlyBoundCompliance(address compliance_) internal view virtual;
function _onlyValidCompliance(address compliance_) internal view;
function _onlyApprovedCompliance() internal view;
function _getTokenBound(address compliance_) internal view returns (address);
function _hasClaim(address userAddress_, IFrictionlessPermissionsManager.FrictionlessPermissionedUser userType_)
    internal
    view
    virtual
    returns (bool);