Function: addOwner(address owner)

The function is used to add a new owner for the smart account.

Inputs

  • owner

    • Control: Fully controlled by caller.

    • Constraints: Should not be address(0).

    • Impact: The owner becomes a new owner of the smart account.

Branches and code coverage

Intended branches

  • The mapping _smartAccountOwners is set to true for the owner.

  • The value of numberOfOwners mapping increases for msg.sender.

Negative behavior

  • Revert if owner is a smart contract.

  • Revert if owner is address(0).

  • Revert if owner is already an owner of the smart account.

Zellic © 2024Back to top ↑