Message: ExecuteMsg::Allocate
This allocates INJ staking rewards from the sender to a specified recipient.
Inputs
info.sender
Validation: Verified to ensure the sender is whitelisted. Confirmed that the contract is not paused.
Impact: Acts as the allocator of the funds.
recipient
Validation: Ensures the recipient address is valid. Cannot be the same as
info.sender
.Impact: Receives the allocated amount.
amount
Validation: Must be at least
ONE_INJ
.Impact: The amount of INJ allocated to the recipient.
Branches and code coverage (including function calls)
Intended branches
Create a new allocation if none exists.
Update an existing allocation with the new amount and share price.
Negative behavior
Fail if the contract is paused.
Fail if the sender is not whitelisted.
Fail if the recipient is the same as the sender.
Fail if the amount is less than
ONE_INJ
.Fail if the recipient address is invalid.