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.
get the FeeInfo for a given key.
Parameters
Returns
get the feeInBps value for a given key
Parameters
Returns
get the feeRecipientAddr value for a given key
Parameters
Returns
Calculates the actual fee in absolute terms for a given fee in basis points.
Parameters
Returns
Event emitted during _setTokenFee
error thrown if the recipient is a zero address
error thrown if the feesInBps is outside the valid range
Struct which defines the FeeInfo, representing the fee in basis points and the recipient of the fees on-chain.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
feeKey_
bytes32
the key as generated by the function getTokenFeeKey
<none>
FeeInfo
FeeInfo the fees associated with a token transfer.
tokenFeeKey_
bytes32
the key as generated by the function getTokenFeeKey
<none>
uint256
the feeInBps value
tokenFeeKey_
bytes32
the key as generated by the function getTokenFeeKey
<none>
address
the feeRecipientAddr value
tokensAmount_
uint256
the amount of tokens used to determine the base calculation.
feeInBps_
uint256
the fee in basis points for calculation.
feeAmount_
uint256
the actual fee in absolute terms for a given fee in basis points.