Function: updateServiceAgreement(DataTypes.SAParams _newAgreement)
This facilitates the update of the service agreement.
Inputs
_newAgreementControl: Fully controlled by the caller.
Constraints: None.
Impact: The new service agreement.
Branches and code coverage
Intended branches
Assure that the
stakedTokenaddress 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
lastUpdatevariable to the current block timestamp.Set the
agreementvariable to_newAgreement.
Negative behavior
Should not be callable by anyone other than the contract admin.