IFrictionlessTreasuryManager
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 IFrictionlessTreasuryManager is responsible for all token operations, minting, transferring and burning in the Frictionless protocol. The tokens and their lifecycles are defined in the public README for the Frictionless protocol at https://gitlab.com/dfyclabs/protocol/dfyclabs-tokens/-/tree/main?ref_type=heads#tokens-overview
Functions
setTokensInitData
Sets and associates the implementation authority with the associated token type
Parameters
Name | Type | Description |
---|---|---|
|
| the |
mintFundDepositForTreasury
Mints a Fund Deposit Token in the specified currency/IBAN pair. This function is invoked to create the genesis mint of the deposit token in the PROTOCOL_TREASURY.
Parameters
Name | Type | Description |
---|---|---|
|
| the immutable deposit data for the token |
|
| the address of the treasury, which receives the deposit tokens |
|
| the amount of tokens |
Returns
Name | Type | Description |
---|---|---|
|
| address of the token minted emits |
mintDigitalSecurity
Mints a FrictionlessDigitalSecurityToken as the future dated cash distribution from the underlying FrictionlessOnChainAssetToken. This function is invoked to create the genesis mint of the deposit token in the PROTOCOL_TREASURY.
Parameters
Name | Type | Description |
---|---|---|
|
| the immutable data for the token |
|
| the mutable data for the token |
|
| the amount of tokens |
|
| the address of the protocol user, which receives the digital security tokens |
Returns
Name | Type | Description |
---|---|---|
|
| address of the token minted emits |
mintOnChainAsset
Mints a FrictionlessOnChainAssetToken as the representation of the asset to be securitized, fractionalized & sold. This function is invoked to create the genesis mint of the deposit token to the PERMISSIONED_CUSTODIAN.
Parameters
Name | Type | Description |
---|---|---|
|
| the immutable data for the token |
|
| the issuance data for the token |
|
| the update data for the token |
|
| the address of the protocol custodian, which receives the |
Returns
Name | Type | Description |
---|---|---|
|
| address of the token minted emits |
mintTokenForUser
Used to increase the mint of a Frictionless token which already exists.
Parameters
Name | Type | Description |
---|---|---|
|
| the address of the token |
|
| the address to min the token to |
|
| the amount of tokens to mint emits |
transferToken
Used to increase the mint of a Frictionless token which already exists.
Parameters
Name | Type | Description |
---|---|---|
|
| the address of the token |
|
| the address to transfer the tokens from |
|
| the address to transfer the tokens to |
|
| the amount of tokens to mint emits |
burnToken
Used to burn an amount of Frictionless token which already exists.
Parameters
Name | Type | Description |
---|---|---|
|
| the address of the token |
|
| the address to burn the tokens from |
|
| the amount of tokens to burn emits |
getFundDepositToken
returns the address of the fund deposit token by currency and fundIBAN
Parameters
Name | Type | Description |
---|---|---|
|
| the currency of the fund deposit token |
|
| the fundIBAN of the fund deposit token |
Returns
Name | Type | Description |
---|---|---|
|
| the address of the fund deposit token for specified currency and fundIBAN |
getFundDepositTokenKey
returns fund deposit token key by currency and fundIBAN
Parameters
Name | Type | Description |
---|---|---|
|
| the currency of the fund deposit token you need |
|
| the fundIBAN of the fund deposit token you need |
Returns
Name | Type | Description |
---|---|---|
|
| the fund deposit token key |
Events
FrictionlessTokenMinted
Event emitted when a FrictionlessFundDeposit
, FrictionlessDigitalSecurity
or FrictionlessOnChainAsset
is minted.
FrictionlessTokenTransferred
Event emitted when a FrictionlessFundDeposit
, FrictionlessDigitalSecurity
or FrictionlessOnChainAsset
is transferred.
FrictionlessTokenBurned
Event emitted when a FrictionlessFundDeposit
, FrictionlessDigitalSecurity
or FrictionlessOnChainAsset
is burned.
Errors
FrictionlessIsZeroAddress
throws if specific address is zero.
FrictionlessTreasuryManagerNotAProtocolTreasury
error throw if the function caller is not a PROTOCOL_TREASURY address. Thrown during the mintFundDepositForTreasury
FrictionlessTreasuryManagerFundDepositTokenAlreadyExists
error throw if the FundDepositToken for specified currency and fundIBAN already exists
FrictionlessTreasuryManagerInvalidTokenInitData
error throw if the data for the token init data FrictionlessTokenInitData
is invalid. Thrown during the _setTokensInitData
FrictionlessTreasuryManagerUnableToUpdateTokenInitData
error throw if the data for the token init data FrictionlessTokenInitData
is already set. Thrown during the _setTokensInitData
FrictionlessTreasuryManagerInvalidDepositData
error throw if the data for the IFrictionlessFundDepositToken is invalid. Thrown during the mintFundDepositForTreasury
FrictionlessTreasuryManagerInvalidFDSImmutableData
error throw if the data for the IFrictionlessDigitalSecurityToken is invalid. Thrown during the mintDigitalSecurity
FrictionlessTreasuryManagerInvalidFOCASpecData
error throw if the data for the IFrictionlessDigitalSecurityToken is invalid. Thrown during the mintOnChainAsset
FrictionlessTreasuryManagerInvalidFOCAIssuanceData
error throw if the data for the IFrictionlessDigitalSecurityToken is invalid. Thrown during the mintOnChainAsset
Structs
FrictionlessTokenInitData
Structure that encapsulates both the implAuthority and the compliance for the specific token.