Function: pooledDepositCommon(Contribution[] contributions, address token)
This function emits the Deposit event for each contributor and the PooledDeposit event for this deposit. It returns the total amount that needs to be transferred.
Inputs
contributionsControl: Fully controlled by the caller.
Constraints: The array length must not be greater than
MAX_CONTRIBUTIONS. Each contribution must not have an amount smaller thanminDeposits[token].Impact: The contributors and amounts of each deposit.
tokenControl: Fully controlled by the caller.
Constraints: The token must be supported by this contract.
Impact: The token to deposit.
Branches and code coverage
Intended branches
Increase the
nextStakeNumby one for each deposit.Increase the
nextPoolIdby one for the pooled deposit.
Negative behavior
Revert when the token is not supported.
Revert when the length of the
contributionsarray is greater thanMAX_CONTRIBUTIONS.Revert when a deposit amount is smaller than
minDeposits[token].