acl:transfer-ownership
Transfer ownership of an Ownable contract. On Ownable2Step contracts this stages the pending owner, who must then accept.
Syntax
Section titled “Syntax”acl:transfer-ownership <of> <contract> <to> <newOwner>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
of | command | Keyword of |
contract | address | Ownable contract address |
to | command | Keyword to |
newOwner | address | New owner address |
Examples
Section titled “Examples”load acl
# Hand over a token contract to the DAO treasuryacl:transfer-ownership of 0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72 to 0x4F2083f5fBede34C2714aFfb3105539775f7FE64- Must be sent by the current owner.
- On plain
Ownablecontracts the transfer is immediate. OnOwnable2Stepcontracts this only stages the pending owner, who must then run acl:accept-ownership; passing the zero address cancels a pending transfer.
See Also
Section titled “See Also”- acl:accept-ownership — finalize a two-step transfer
- @acl:owner — read the current owner
- @acl:pendingOwner — read the pending owner