Function: setShares(uint256 oldShares, uint256 newShares, uint256 sharesChange, bytes signature)
This function is used to set the number of shares.
Inputs
oldSharesControl: Arbitrary.
Constraints: None.
Impact: Value of the old shares.
newSharesControl: Arbitrary.
Constraints: None.
Impact: Value of the new shares.
sharesChangeControl: Arbitrary.
Constraints: None.
Impact: Value of the shares change.
signatureControl: Arbitrary.
Constraints: None.
Impact: Bytes signature.
Branches and code coverage
Intended branches
Updates the shares.
Negative behavior
Reverts if the caller is not a publisher.
Reverts if the old share is not equal to the new share.
Reverts if the share change is not equal to the difference between the old and new share.
Reverts if the signature is invalid; signer is not the calculator role.