recordRedemptionFor
Contract: JBSingleTokenPaymentTerminalStore
Interface: IJBSingleTokenPaymentTerminalStore
- Step by step
- Code
- Errors
- Bug bounty
Records newly redeemed tokens of a project.
Redeems the project's tokens according to values provided by a configured data source. If no data source is configured, redeems tokens along a redemption bonding curve that is a function of the number of tokens being burned.
The msg.sender must be an IJBSingleTokenPaymentTerminal
.
Definition
function recordRedemptionFor(
address _holder,
uint256 _projectId,
uint256 _tokenCount,
string memory _memo,
bytes memory _metadata
)
external
override
nonReentrant
returns (
JBFundingCycle memory fundingCycle,
uint256 reclaimAmount,
IJBRedemptionDelegate delegate,
string memory memo
) { ... }
- Arguments:
_holder
is the account that is having its tokens redeemed._projectId
is the ID of the project to which the tokens being redeemed belong._tokenCount
is the number of project tokens to redeem, as a fixed point number with 18 decimals._memo
is a memo to pass along to the emitted event._metadata
are bytes to send along to the data source, if one is provided.
- The resulting function overrides a function definition from the
JBSingleTokenPaymentTerminalStore
interface. - The function returns:
fundingCycle
is the funding cycle during which the redemption was made.reclaimAmount
is the amount of terminal tokens reclaimed, as a fixed point number with 18 decimals.delegate
is a delegate contract to use for subsequent calls.memo
is a memo that should be passed along to the emitted event.