Function: updateTrustedSigner(address trustedSigner, uint256 expiresAt)
The function encompasses the ability for the contract's administrator to establish both a trustworthy signer and the duration for which this trust is valid.
Inputs
trustedSignerControl: Arbitrary.
Constraints: It is necessary to convey a value of the
addresstype.Impact: The conveyed value is appended to the
pubkeyof thetrustedSignersarray.
expiresAtControl: Arbitrary.
Constraints: It is necessary to convey a value of the
uint256type.Impact: The conveyed value is appended to the
expiresAtof thetrustedSignersarray.
Branches and code coverage
Intended branches
When a
trustedSignervalue that does not exist in thetrustedSignersarray is provided, thetrustedSignervalue along with theexpiredAtvalue is correctly added.When the
expiredAtvalue is 0, thetrustedSignervalue is successfully removed from thetrustedSignersarray.When a
trustedSignervalue that already exists in thetrustedSignersarray is provided, theexpiredAtvalue is updated successfully.
Negative behavior
When the
expiredAtvalue is 0 and thetrustedSignervalue does not exist in thetrustedSignersarray, the transaction reverts.When the
trustedSignersarray is completely filled and an attempt is made to add a newtrustedSigner, the transaction reverts.
Function call analysis
No external function calls found.