Function: depositToken(address contributor, uint256 amount, address token)
This function emits the Deposit event and transfers the supported tokens from the caller to the bfx on behalf of the contributor.
Inputs
contributorControl: Fully controlled by the caller.
Constraints: N/A.
Impact: The contributor of the deposit.
amountControl: Fully controlled by the caller.
Constraints: The value must not be smaller than
minDeposits[token], and the caller must have enough tokens to transfer.Impact: The amount to transfer.
tokenControl: Fully controlled by the caller.
Constraints: The token must be supported by this contract.
Impact: The token to transfer.
Branches and code coverage
Intended branches
Transfer the supported tokens from the caller to the
bfx.Increase the
nextDepositNumby one when the transfer succeeds.
Negative behavior
Revert when the token is not supported.
Revert when the amount is smaller than
minDeposits[token].Revert when the transfer fails.