_beforeTransferTo
Contract: JBPayoutRedemptionPaymentTerminal
- Step by step
- Code
- Bug bounty
Logic to be triggered before transferring tokens from this terminal.
Definition
function _beforeTransferTo(address, uint256) internal override { ...}
- Arguments:
_tois the address to which the transfer is going._amountis the amount of the transfer, as a fixed point number with the same number of decimals as this terminal.
- The resulting function is internal to this contract and its inheriters.
- The resulting function overrides a function definition from the
IJBPayoutRedemptionPaymentTerminalinterface.
Body
-
Before transferring tokens to another address, approve that address to pull the specified amount of tokens from this contract.
IERC20(token).approve(_to, _amount);External references:
/**
@notice
Logic to be triggered before transferring tokens from this terminal.
@param _to The address to which the transfer is going.
@param _amount The amount of the transfer, as a fixed point number with the same number of decimals as this terminal.
*/
function _beforeTransferTo(address _to, uint256 _amount) internal override {
IERC20(token).approve(_to, _amount);
}
| Category | Description | Reward |
|---|---|---|
| Optimization | Help make this operation more efficient. | 0.5ETH |
| Low severity | Identify a vulnerability in this operation that could lead to an inconvenience for a user of the protocol or for a protocol developer. | 1ETH |
| High severity | Identify a vulnerability in this operation that could lead to data corruption or loss of funds. | 5+ETH |