sinQlarity Docs
  • Developers Documentation
  • INTRODUCTION
    • KEY BENEFITS
    • KEY FEATURES
  • OUR USP's
  • GOALS
  • USE CASES
    • DEFI
    • NFTs
    • GAMING
    • SOCIAL
    • INFRASTRUCTURE
    • GOVERNANCE
    • SECURITY
  • ARCHITECTURE
  • USER FLOW
  • USE CASE FOR CHAINS
  • Getting Started
    • PLATFORM, API & LIBRARY
    • LIBRARY INSTALLATION
    • LIBRARY USAGE
    • HOW TO IMPLEMENT FUNCTIONS
  • CONTRACT DETAILS
    • CROWD FUND
    • DAO
    • DUTCH AUCTION
    • ENGLISH AUCTION
    • ERC-20
    • ERC-20 OPENZEPPLIN
    • ERC-20 SWAP
    • ERC-721
    • ETHER WALLET
    • GAS WHITELIST
    • ICO
    • LIQUIDITY POOL
    • MERKLE PROOF
    • MULTISIG
    • OWNABLE
    • PIGGY BANK
    • STAKING
    • SUBSCRIPTION
    • TIMELOCK
    • TODO
    • UNI-PAYMENT CHANNEL
    • UNISWAP
    • VAULT
    • VOTING
    • WHITELIST
    • CHAINLINK ORACLE
    • BI-DIRECTIONAL PAYMENT
    • AIRDROP
Powered by GitBook
On this page
  • DESCRIPTION
  • FUNCTIONS
  • EXTRA PARAMETERS
  • USES
  1. CONTRACT DETAILS

OWNABLE

DESCRIPTION

The Ownable contract provides basic ownership functionality. It allows the owner to be set during contract deployment and provides a modifier onlyOwner to restrict access to certain functions only to the owner. The contract includes a currentOwner function to retrieve the address of the current owner. The owner can transfer ownership to a new address using the transferOwnership function. Additionally, the owner can renounce ownership using the renounceOwnership function, leaving the contract without an owner.

FUNCTIONS

  1. currentOwner: Returns the address of the current owner of the contract.

  2. transferOwnership: Allows the current owner to transfer ownership of the contract to a new address. Requires the new owner's address as a parameter.

  3. renounceOwnership: Allows the current owner to renounce ownership of the contract, making it ownerless.

EXTRA PARAMETERS

Contract level : Easy

Utility Tags: Ownership, Access Control, Ownership Transfer

USES

  1. Access Control: The ownable contract can be inherited by other contracts to implement access control mechanisms, ensuring that only the designated owner can execute certain functions.

  2. Governance: Contracts using the Ownable functionality can be utilized for decentralized governance, where ownership can be transferred to elected or voted addresses.

  3. Upgradeability: Ownership functionality can be used in upgradeable contracts to transfer ownership to a new version of the contract.

  4. Contract Maintenance: The ownable contract allows contract owners to perform maintenance tasks and update contract parameters securely.

  5. Smart Contracts: Ownership functionality is commonly used in various smart contracts to manage permissions and control access to critical functions and resources.

PreviousMULTISIGNextPIGGY BANK

Last updated 1 year ago