Function: pooledDeposit(Contribution[] contributions)
This function is for depositing the paymentToken
to the rabbit
with multiple contributors.
Inputs
contributions
Control: Completely controlled by the caller.
Constraints: The length of the array must be smaller than
MAX_CONTRIBUTIONS
.Impact: A set of contributions to treat as the deposited contributions.
Branches and code coverage
Intended branches
Transfer the
paymentToken
frommsg.sender
to therabbit
.Increase the
nextDepositId
for each contribution.
Negative behavior
Revert when the
contribution.amount
is smaller thanMIN_DEPOSIT
.Revert when the
totalAmount
is not bigger than zero.Revert when the transfer fails.