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 theowner
.The value of
numberOfOwners
mapping increases formsg.sender
.
Negative behavior
Revert if
owner
is a smart contract.Revert if
owner
isaddress(0)
.Revert if
owner
is already an owner of the smart account.