OwnableContract
Index
Methods
ensureOwnerSignature
Ensures that the transaction is authorized by the contract owner. Typically used to restrict access to sensitive functions.
Returns Promise<AccountUpdate>
A promise that resolves to an
AccountUpdate
, representing the action of ensuring the owner's signature.
transferOwnership
Transfers ownership of the contract to a new owner.
Parameters
newOwner: PublicKey
The public key of the new owner.
Returns Promise<PublicKey>
A promise that resolves to the public key of the old owner.
Interface representing ownable functionality for smart contracts.
The
OwnableContract
interface extendsSmartContract
and provides methods to ensure that only the owner can perform certain actions and to allow the transfer of ownership to a new owner.By implementing the Ownable interface, contracts can secure critical operations and provide a transparent mechanism for ownership management.