Function: replaceGuardian(byte[32] guardian, byte[32] newGuardian, uint48 validUntil, uint48 validAfter)
This function can be used to replace a guardian.
Inputs
guardianControl: Arbitrary.
Constraints: Must be already present.
Impact: The guardian to be removed.
newGuardianControl: Arbitrary.
Constraints: Must not be zero.
Impact: The guardian to be added.
validUntilControl: Arbitrary.
Constraints: Must not be in the past and before
validAfter.Impact: Time until the new guardian will be active.
validAfterControl: Arbitrary.
Constraints: Must be in the future (respecting the security delay).
Impact: Time from which the new guardian will be active.
Branches and code coverage
Intended branches
Removes the old guardian and adds the new one.
Negative behavior
Reverts if
guardianwas not set.Reverts if the old and new guardians are the same.
Reverts if
newGuardianis zero.Reverts if the time frame is invalid.