Function: updateServiceAgreement(DataTypes.SAParams _newAgreement)
This facilitates the update of the service agreement.
Inputs
_newAgreement
Control: Fully controlled by the caller.
Constraints: None.
Impact: The new service agreement.
Branches and code coverage
Intended branches
Assure that the
stakedToken
address is the same as before, as otherwise accounting would be wrong across the system.Assure that
block.timestamp > endAt
.Perform general input checks on
_newAgreement
.Set the
lastUpdate
variable to the current block timestamp.Set the
agreement
variable to_newAgreement
.
Negative behavior
Should not be callable by anyone other than the contract admin.