Message: ExecuteMsg::DistributeAll
This distributes staking rewards from the sender to all recipients based on the sender's allocations. Rewards can be distributed in INJ or TruINJ.
Inputs
info.sender
Validation: Verified to ensure the sender is whitelisted. Confirmed to have at least one allocation.
Impact: Acts as the distributor of rewards.
in_inj
Validation: N/A.
Impact: Determines whether rewards are distributed in INJ or TruINJ.
info.funds
Validation: If provided, ensures it is handled correctly, either as additional rewards or refunded if not required.
Impact: May be redistributed or refunded to the sender.
Branches and code coverage (including function calls)
Intended branches
Distribute rewards for all allocations in either INJ or TruINJ.
Refund remaining INJ back to the sender after processing all allocations.
Negative behavior
Fail if the contract is paused.
Fail if the sender is not whitelisted.
Fail if the sender has no allocations.
Handle cases where no rewards are available for distribution, refunding any attached INJ to the sender.