FeeManager_v1.sol
Last updated
Last updated
Inherits: , ,
Author: Inverter Network
This contract manages the different fees possible on a protocol level. The different fees can be fetched publicly and be set by the owner of the contract.
Inherits from for interface detection, for owner-based access control, and implements the interface.
Base Points used for percentage calculation. This value represents 100%.
The maximum fee percentage amount that can be set. Based on the BPS.
The default protocol treasury address.
The workflow treasury address. Orchestrator => treasury
The default issuance fee percentage amount that apply unless workflow specific fees are set.
The default collateral fee percentage amount that apply unless workflow specific fees are set.
The workflow issuance fee. Orchestrator => hash(functionSelector + module address) => feeStruct.
The workflow collateral fee. Orchestrator => hash(functionSelector + module address) => feeStruct.
Storage gap for future upgrades.
Modifier to check if the given address is valid.
Modifier to check if the given fee is valid.
Modifier to check if the given max fee is valid.
Returns the default treasury for all workflows.
Returns
<none>
address
The address of the treasury.
Returns the treasury assigned to the given workflow.
Parameters
workflow
address
The address of the workflow.
Returns
<none>
address
The address of the treasury.
Returns the default collateral fee for all workflows.
Returns
<none>
uint256
The collateral fee amount in relation to the BPS.
Returns the default issuance fee for all workflows.
Returns
<none>
uint256
The issuance fee amount in relation to the BPS.
Returns the collateral fee for a specific workflow module function.
Parameters
workflow
address
The address of the workflow that contains the module function.
module
address
The address of the module that contains the function.
functionSelector
bytes4
The function selector of the target function.
Returns
fee
uint256
The collateral fee amount in relation to the BPS.
Returns the issuance fee for a specific workflow module function.
Parameters
workflow
address
The address of the workflow that contains the module function.
module
address
The address of the module that contains the function.
functionSelector
bytes4
The function selector of the target function.
Returns
fee
uint256
The issuance fee amount in relation to the BPS.
Returns the collateral fee for a specific workflow module function and the according treasury address of the workflow.
Parameters
workflow
address
The address of the workflow that contains the module function.
module
address
The address of the module that contains the function.
functionSelector
bytes4
The function selector of the target function.
Returns
fee
uint256
The collateral fee amount in relation to the BPS.
treasury
address
The address of the treasury.
Returns the issuance fee for a specific workflow module function and the according treasury address of the workflow.
Parameters
workflow
address
The address of the workflow that contains the module function.
module
address
The address of the module that contains the function.
functionSelector
bytes4
The function selector of the target function.
Returns
fee
uint256
The issuance fee amount in relation to the BPS.
treasury
address
The address of the treasury.
Sets the maximum fee percentage that can be assigned.
This function can only be called by the owner.
Parameters
_maxFee
uint256
The max Fee in relation to the BPS.
Sets the default protocol treasury address.
This function can only be called by the owner.
Parameters
_defaultProtocolTreasury
address
The address of the default protocol treasury.
Sets the protocol treasury address for a specific workflow.
This function can only be called by the owner.
Parameters
workflow
address
The address of the workflow.
treasury
address
The address of the protocol treasury for that specific workflow.
Sets the default collateral fee of the protocol.
This function can only be called by the owner.
Parameters
_defaultCollateralFee
uint256
The default collateral fee of the protocol in relation to the BPS.
Sets the default issuance fee of the protocol.
This function can only be called by the owner.
Parameters
_defaultIssuanceFee
uint256
The default issuance fee of the protocol in relation to the BPS.
Sets the collateral fee for a specific workflow module function.
This function can only be called by the owner.
Parameters
workflow
address
The address of the workflow that contains the module function.
module
address
The address of the module that contains the function.
functionSelector
bytes4
The function selector of the target function.
set
bool
Boolean that determines if the fee is actually used or not.
fee
uint256
The collateral fee in relation to the BPS.
Sets the issuance fee for a specific workflow module function.
This function can only be called by the owner.
Parameters
workflow
address
The address of the workflow that contains the module function.
module
address
The address of the module that contains the function.
functionSelector
bytes4
The function selector of the target function.
set
bool
Boolean that determines if the fee is actually used or not.
fee
uint256
The issuance fee in relation to the BPS.
See .