Assessment reports>Lazer>Threat Model>updateTrustedSigner

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

  • trustedSigner

    • Control: Arbitrary.

    • Constraints: It is necessary to convey a value of the address type.

    • Impact: The conveyed value is appended to the pubkey of the trustedSigners array.

  • expiresAt

    • Control: Arbitrary.

    • Constraints: It is necessary to convey a value of the uint256 type.

    • Impact: The conveyed value is appended to the expiresAt of the trustedSigners array.

Branches and code coverage

Intended branches

  • When a trustedSigner value that does not exist in the trustedSigners array is provided, the trustedSigner value along with the expiredAt value is correctly added.

  • When the expiredAt value is 0, the trustedSigner value is successfully removed from the trustedSigners array.

  • When a trustedSigner value that already exists in the trustedSigners array is provided, the expiredAt value is updated successfully.

Negative behavior

  • When the expiredAt value is 0 and the trustedSigner value does not exist in the trustedSigners array, the transaction reverts.

  • When the trustedSigners array is completely filled and an attempt is made to add a new trustedSigner, the transaction reverts.

Function call analysis

  • No external function calls found.

Zellic © 2025Back to top ↑