IFrictionlessModularCompliance
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.
Functions
init
Initializes the modular compliance, sets the maximum allowable modules per token and adds the modules provided
Parameters
Name | Type | Description |
---|---|---|
|
| the array of module addresses to be added |
|
| maximum number of allowable modules which can be bound. throws |
updateMaxModulesCount
Set the maximum number of allowable modules which can be bound.
Parameters
Name | Type | Description |
---|---|---|
|
| maximum number of allowable modules which can be bound. throws |
addModules
Adds modules based on the array of module addresses provided
Parameters
Name | Type | Description |
---|---|---|
|
| the array of module addresses to be added throws |
removeModules
Removes modules based on the array of module addresses provided
Parameters
Name | Type | Description |
---|---|---|
|
| the array of module addresses to be removed throws |
maxModulesCount
Returns the maximum number of allowable modules which can be bound.
Returns
Name | Type | Description |
---|---|---|
|
| maximum number of allowable modules which can be bound. |
Events
MaxModulesCountUpdated
Emitted during updateMaxModulesCount
to inform of new modules max count updates
ModulesAdded
Emitted during addModules
to inform of new modules added
ModulesRemoved
Emitted during removeModules
to inform of modules removed
Errors
FrictionlessIsZeroAddress
thrown if specific address is zero.
FrictionlessModularComplianceZeroMaxModulesCount
thrown if an attempt to set the maximum number of allowable modules to zero is made in updateMaxModulesCount
FrictionlessModularComplianceModuleIsAlreadyBound
thrown if an attempt to add an already existing module during addModules
FrictionlessModularComplianceModuleDoesNotExist
thrown if module for the given address is not already bound by the modifier onlyExistingModule
FrictionlessModularComplianceMaxModuleCountReached
thrown if an attempt to add more than the allowable modules during addModules
FrictionlessModularComplianceCallerNotATokenOrOwner
thrown during bindToken
or unBindToken
if the caller is not the owner or the bound token address
FrictionlessModularComplianceCallerNotAToken
thrown if the the msg.sender is not the bound token address during modifier onlyToken