erc173i

    0

    0

    lucycodes42

    Solidity Code Snippets

    Shortcut: erc173i_draft

    // https://eips.ethereum.org/EIPS/eip-173
    // https://github.com/0xcert/ethereum-erc721/blob/master/src/contracts/ownership/ownable.sol (this example)
    // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
    // https://github.com/FriendlyUser/solidity-smart-contracts//blob/v0.2.0/contracts/other/CredVert/Ownable.sol
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.5.0 <0.8.0;
    
    /// @title ERC-173 Contract Ownership Standard
    /// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-173.md
    ///  Note: the ERC-165 identifier for this interface is 0x7f5828d0
    interface ERC173 /* is ERC165 */ {
        /// @dev This emits when ownership of a contract changes
        event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
    
        /// @notice Get the address of the owner
        /// @return The address of the owner.
        function owner() external view returns (address);
        /// @notice Set the address of the new owner of the contract
        /// @dev Set _newOwner to address(0) to renounce any ownership.
        /// @param _newOwner The address of the new owner of the contract
        function transferOwnership(address _newOwner) external;
    }
    
    interface ERC165 {
        /// @notice Query if a contract implements an interface
        /// @param interfaceID The interface identifier, as specified in ERC-165
        /// @dev Interface identification is specified in ERC-165. This function
        ///  uses less than 30,000 gas.
        /// @return `true` if the contract implements `interfaceID` and
        ///  `interfaceID` is not 0xffffffff, `false` otherwise
        function supportsInterface(bytes4 interfaceID) external view returns (bool);
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.