ETH Price: $3,169.34 (-8.68%)
Gas: 3 Gwei

Token

Humanbound Token (HBT)
 

Overview

Max Total Supply

0 HBT

Holders

13

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
somer.eth
Balance
1 HBT
0x32B74B90407309F6637245292cd90347DE658A37
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
HumanboundToken

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 13 : HumanboundToken.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.13;

import "@violetprotocol/erc721extendable/contracts/extensions/metadata/ERC721Metadata.sol";

contract HumanboundToken is ERC721Metadata {
    constructor(
        string memory name_,
        string memory symbol_,
        address extendLogic,
        address approveLogic,
        address getterLogic,
        address onReceiveLogic,
        address transferLogic,
        address hooksLogic
    )
        ERC721Metadata(
            name_,
            symbol_,
            extendLogic,
            approveLogic,
            getterLogic,
            onReceiveLogic,
            transferLogic,
            hooksLogic
        )
    {}
}

File 2 of 13 : ERC721Metadata.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "../base/ERC721.sol";

/**
 * @dev ERC721Metadata Extendable contract
 *
 * Constructor arguments take usual `name` and `symbol` arguments for the token
 * with additional extension addresses specifying where the functional logic
 * for each of the token features live which is passed to the Base ERC721 contract
 *
 * Metadata-specific extensions must be extended immediately after deployment by
 * calling the `finaliseERC721MetadataExtending` function.
 *
 */
bytes4 constant ERC721MetadataInterfaceId = 0x5b5e139f;

contract ERC721Metadata is ERC721 {
    constructor(
        string memory name_,
        string memory symbol_,
        address extendLogic,
        address approveLogic,
        address getterLogic,
        address onReceiveLogic,
        address transferLogic,
        address hooksLogic
    ) ERC721(name_, symbol_, extendLogic, approveLogic, getterLogic, onReceiveLogic, transferLogic, hooksLogic) {}

    /**
     * @dev Extends the contract with Metadata-specific functionalities
     *
     * Must be called immediately after contract deployment.
     *
     */
    function finaliseERC721MetadataExtending(
        address metadataGetterLogic,
        address setTokenURILogic,
        address mintLogic,
        address burnLogic
    ) public {
        IExtendLogic self = IExtendLogic(address(this));

        self.extend(metadataGetterLogic);
        self.extend(setTokenURILogic);
        self.extend(mintLogic);
        self.extend(burnLogic);

        IERC165Register(address(this)).registerInterface(ERC721MetadataInterfaceId);
    }
}

File 3 of 13 : ERC721.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@violetprotocol/extendable/extendable/Extendable.sol";
import "@violetprotocol/extendable/extensions/extend/IExtendLogic.sol";
import { ERC721State, ERC721Storage } from "../../storage/ERC721Storage.sol";

/**
 * @dev Core ERC721 Extendable contract
 *
 * Constructor arguments take usual `name` and `symbol` arguments for the token
 * with additional extension addresses specifying where the functional logic
 * for each of the token features live.
 *
 */
bytes4 constant ERC721InterfaceId = 0x80ac58cd;

contract ERC721 is Extendable {
    constructor(
        string memory name_,
        string memory symbol_,
        address extendLogic,
        address approveLogic,
        address getterLogic,
        address onReceiveLogic,
        address transferLogic,
        address hooksLogic
    ) Extendable(extendLogic) {
        // Set the token name and symbol
        ERC721State storage erc721State = ERC721Storage._getState();
        erc721State._name = name_;
        erc721State._symbol = symbol_;

        // Attempt to extend the contract with core functionality
        // Must use low-level calls since contract has not yet been fully deployed
        (bool extendApproveSuccess, ) = extendLogic.delegatecall(
            abi.encodeWithSignature("extend(address)", approveLogic)
        );
        require(extendApproveSuccess, "failed to initialise approve");

        (bool extendGetterSuccess, ) = extendLogic.delegatecall(
            abi.encodeWithSignature("extend(address)", getterLogic)
        );
        require(extendGetterSuccess, "failed to initialise getter");

        (bool extendOnReceiveSuccess, ) = extendLogic.delegatecall(
            abi.encodeWithSignature("extend(address)", onReceiveLogic)
        );
        require(extendOnReceiveSuccess, "failed to initialise onReceive");

        (bool extendTransferSuccess, ) = extendLogic.delegatecall(
            abi.encodeWithSignature("extend(address)", transferLogic)
        );
        require(extendTransferSuccess, "failed to initialise transfer");

        (bool extendHooksSuccess, ) = extendLogic.delegatecall(abi.encodeWithSignature("extend(address)", hooksLogic));
        require(extendHooksSuccess, "failed to initialise hooks");

        (bool registerInterfaceSuccess, ) = extendLogic.delegatecall(
            abi.encodeWithSignature("registerInterface(bytes4)", ERC721InterfaceId)
        );
        require(registerInterfaceSuccess, "failed to register erc721 interface");
    }
}

File 4 of 13 : Extendable.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "../errors/Errors.sol";
import {CallerState, CallerContextStorage} from "../storage/CallerContextStorage.sol";
import {ExtendableState, ExtendableStorage} from "../storage/ExtendableStorage.sol";

/**
 *  ______  __  __  ______  ______  __   __  _____   ______  ______  __      ______    
 * /\  ___\/\_\_\_\/\__  _\/\  ___\/\ "-.\ \/\  __-./\  __ \/\  == \/\ \    /\  ___\
 * \ \  __\\/_/\_\/\/_/\ \/\ \  __\\ \ \-.  \ \ \/\ \ \  __ \ \  __<\ \ \___\ \  __\
 *  \ \_____\/\_\/\_\ \ \_\ \ \_____\ \_\\"\_\ \____-\ \_\ \_\ \_____\ \_____\ \_____\
 *   \/_____/\/_/\/_/  \/_/  \/_____/\/_/ \/_/\/____/ \/_/\/_/\/_____/\/_____/\/_____/
 *
 *  Core module for the Extendable framework
 *  
 *  Inherit this contract to make your contracts Extendable!
 *
 *  Your contract can perform ad-hoc addition or removal of functions
 *  which allows modularity, re-use, upgrade, and extension of your
 *  deployed contracts. You can make your contract immutable by removing
 *  the ability for it to be extended.
 *
 *  Constructor initialises owner-based permissioning to manage
 *  extending, where only the `owner` can extend the contract.
 *  
 *  You may change this constructor or use extension replacement to
 *  use a different permissioning pattern for your contract.
 *
 *  Requirements:
 *      - ExtendLogic contract must already be deployed
 */
contract Extendable {
    /**
     * @dev Contract constructor initialising the first extension `ExtendLogic`
     *      to allow the contract to be extended.
     *
     * This implementation assumes that the `ExtendLogic` being used also uses
     * an ownership pattern that only allows `owner` to extend the contract.
     * 
     * This constructor sets the owner of the contract and extends itself
     * using the ExtendLogic extension.
     *
     * To change owner or ownership mode, your contract must be extended with the
     * PermissioningLogic extension, giving it access to permissioning management.
     */
    constructor(address extendLogic) {
        // wrap main constructor logic in pre/post fallback hooks for callstack registration
        _beforeFallback();

        // extend extendable contract with the first extension: extend, using itself in low-level call
        (bool extendSuccess, ) = extendLogic.delegatecall(abi.encodeWithSignature("extend(address)", extendLogic));

        // check that initialisation tasks were successful
        require(extendSuccess, "failed to initialise extension");

        _afterFallback();
    }
    
    /**
     * @dev Delegates function calls to the specified `delegatee`.
     *
     * Performs a delegatecall to the `delegatee` with the incoming transaction data
     * as the input and returns the result. The transaction data passed also includes 
     * the function signature which determines what function is attempted to be called.
     * 
     * If the `delegatee` returns a ExtensionNotImplemented error, the `delegatee` is
     * an extension that does not implement the function to be called.
     *
     * Otherwise, the function execution fails/succeeds as determined by the function 
     * logic and returns as such.
     */
    function _delegate(address delegatee) internal virtual returns(bool) {
        _beforeFallback();
        
        bytes memory out;
        (bool success, bytes memory result) = delegatee.delegatecall(msg.data);

        _afterFallback();

        // copy all returndata to `out` once instead of duplicating copy for each conditional branch
        assembly {
            returndatacopy(out, 0, returndatasize())
        }

        // if the delegatecall execution did not succeed
        if (!success) {
            // check if failure was due to an ExtensionNotImplemented error
            if (Errors.catchCustomError(result, ExtensionNotImplemented.selector)) {
                // cleanly return false if error is caught
                return false;
            } else {
                // otherwise revert, passing in copied full returndata
                assembly {
                    revert(out, returndatasize())
                }
            }
        } else {
            // otherwise end execution and return the copied full returndata
            assembly {
                return(out, returndatasize())
            }
        }
    }
    
    /**
     * @dev Internal fallback function logic that attempts to delegate execution
     *      to extension contracts
     *
     * Initially attempts to locate an interfaceId match with a function selector
     * which are extensions that house single functions (singleton extensions)
     *
     * If no implementations are found that match the requested function signature,
     * returns ExtensionNotImplemented error
     */
    function _fallback() internal virtual {
        ExtendableState storage state = ExtendableStorage._getState();

        // if an extension exists that matches in the functionsig
        if (state.extensionContracts[msg.sig] != address(0x0)) {
            // call it
            _delegate(state.extensionContracts[msg.sig]);
        } else {                                                 
            revert ExtensionNotImplemented();
        }
    }

    /**
     * @dev Default fallback function to catch unrecognised selectors.
     *
     * Used in order to perform extension lookups by _fallback().
     *
     * Core fallback logic sandwiched between caller context work.
     */
    fallback() external payable virtual {
        _fallback();
    }
    
    /**
     * @dev Payable fallback function to catch unrecognised selectors with ETH payments.
     *
     * Used in order to perform extension lookups by _fallback().
     */
    receive() external payable virtual {
        _fallback();
    }
    
    /**
     * @dev Virtual hook that is called before _fallback().
     */
    function _beforeFallback() internal virtual {
        CallerState storage state = CallerContextStorage._getState();
        state.callerStack.push(msg.sender);
    }
    
    /**
     * @dev Virtual hook that is called after _fallback().
     */
    function _afterFallback() internal virtual {
        CallerState storage state = CallerContextStorage._getState();
        state.callerStack.pop();
    }
}

File 5 of 13 : IExtendLogic.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "../Extension.sol";
import {ExtendableState, ExtendableStorage} from "../../storage/ExtendableStorage.sol";

/**
 * @dev Interface for ExtendLogic extension
*/
interface IExtendLogic {
    /**
     * @dev Emitted when `extension` is successfully extended
     */
    event Extended(address extension);
    
    /**
     * @dev Emitted when extend() is called and contract owner has not been set
     */
    event OwnerInitialised(address newOwner);

    /**
     * @dev Extend function to extend your extendable contract with new logic
     *
     * Integrate with ExtendableStorage to persist state
     *
     * Sets the known implementor of each function of `extension` as the current call context
     * contract.
     *
     * Emits `Extended` event upon successful extending.
     *
     * Requirements:
     *  - `extension` contract must implement EIP-165.
     *  - `extension` must inherit IExtension
     *  - Must record the `extension` by both its interfaceId and address
     *  - The functions of `extension` must not already be extended by another attached extension
    */
    function extend(address extension) external;

    /**
     * @dev Returns a string-formatted representation of the full interface of the current
     *      Extendable contract as an interface named IExtended
     *
     * Expects `extension.getSolidityInterface` to return interface-compatible syntax with line-separated
     * function declarations including visibility, mutability and returns.
    */
    function getFullInterface() external view returns(string memory fullInterface);

    /**
     * @dev Returns an array of interfaceIds that are currently implemented by the current
     *      Extendable contract
    */
    function getExtensionsInterfaceIds() external view returns(bytes4[] memory);
    /**
     * @dev Returns an array of function selectors that are currently implemented by the current
     *      Extendable contract
    */
    function getExtensionsFunctionSelectors() external view returns(bytes4[] memory);

    /**
     * @dev Returns an array of all extension addresses that are currently attached to the
     *      current Extendable contract
    */
    function getExtensionAddresses() external view returns(address[] memory);
}

/**
 * @dev Abstract Extension for ExtendLogic
*/
abstract contract ExtendExtension is IExtendLogic, Extension {
    /**
     * @dev see {IExtension-getSolidityInterface}
    */
    function getSolidityInterface() override virtual public pure returns(string memory) {
        return  "function extend(address extension) external;\n"
                "function getFullInterface() external view returns(string memory);\n"
                "function getExtensionsInterfaceIds() external view returns(bytes4[] memory);\n"
                "function getExtensionsFunctionSelectors() external view returns(bytes4[] memory);\n"
                "function getExtensionAddresses() external view returns(address[] memory);\n";
    }

    /**
     * @dev see {IExtension-getInterface}
    */
    function getInterface() override virtual public pure returns(Interface[] memory interfaces) {
        interfaces = new Interface[](1);

        bytes4[] memory functions = new bytes4[](5);
        functions[0] = IExtendLogic.extend.selector;
        functions[1] = IExtendLogic.getFullInterface.selector;
        functions[2] = IExtendLogic.getExtensionsInterfaceIds.selector;
        functions[3] = IExtendLogic.getExtensionsFunctionSelectors.selector;
        functions[4] = IExtendLogic.getExtensionAddresses.selector;

        interfaces[0] = Interface(
            type(IExtendLogic).interfaceId,
            functions
        );
    }
}

File 6 of 13 : ERC721Storage.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

struct ERC721State {
    // Token name
    string _name;
    // Token symbol
    string _symbol;
    // Mapping from token ID to owner address
    mapping(uint256 => address) _owners;
    // Mapping owner address to token count
    mapping(address => uint256) _balances;
    // Mapping from token ID to approved address
    mapping(uint256 => address) _tokenApprovals;
    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) _operatorApprovals;
}

library ERC721Storage {
    bytes32 constant STORAGE_NAME = keccak256("extendable:erc721:base");

    function _getState() internal view returns (ERC721State storage erc721State) {
        bytes32 position = keccak256(abi.encodePacked(address(this), STORAGE_NAME));
        assembly {
            erc721State.slot := position
        }
    }
}

File 7 of 13 : Errors.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/**
 * @dev  ExtensionNotImplemented error is emitted by Extendable and Extensions
 *       where no implementation for a specified function signature exists
 *       in the contract
*/
error ExtensionNotImplemented();


/**
 * @dev  Utility library for contracts to catch custom errors
 *       Pass in a return `result` from a call, and the selector for your error message
 *       and the `catchCustomError` function will return `true` if the error was found
 *       or `false` otherwise
*/
library Errors {
    function catchCustomError(bytes memory result, bytes4 errorSelector) internal pure returns(bool) {
        bytes4 caught;
        assembly {
            caught := mload(add(result, 0x20))
        }

        return caught == errorSelector;
    }
}

File 8 of 13 : CallerContextStorage.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

struct CallerState {
    // Stores a list of callers in the order they are received
    // The current caller context is always the last-most address
    address[] callerStack;
}

library CallerContextStorage {
    bytes32 constant private STORAGE_NAME = keccak256("extendable.framework.v1:caller-state");

    function _getState()
        internal 
        view
        returns (CallerState storage callerState) 
    {
        bytes32 position = keccak256(abi.encodePacked(address(this), STORAGE_NAME));
        assembly {
            callerState.slot := position
        }
    }
}

File 9 of 13 : ExtendableStorage.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/**
 * @dev Storage struct used to hold state for Extendable contracts
 */
struct ExtendableState {
    // Array of full interfaceIds extended by the Extendable contract instance
    bytes4[] implementedInterfaceIds;

    // Array of function selectors extended by the Extendable contract instance
    mapping(bytes4 => bytes4[]) implementedFunctionsByInterfaceId;

    // Mapping of interfaceId/functionSelector to the extension address that implements it
    mapping(bytes4 => address) extensionContracts;
}

/**
 * @dev Storage library to access storage slot for the state struct
 */
library ExtendableStorage {
    bytes32 constant private STORAGE_NAME = keccak256("extendable.framework.v1:extendable-state");

    function _getState()
        internal 
        view
        returns (ExtendableState storage extendableState) 
    {
        bytes32 position = keccak256(abi.encodePacked(address(this), STORAGE_NAME));
        assembly {
            extendableState.slot := position
        }
    }
}

File 10 of 13 : Extension.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./IExtension.sol";
import "../errors/Errors.sol";
import "../utils/CallerContext.sol";
import "../erc165/IERC165Logic.sol";

/**
 *  ______  __  __  ______  ______  __   __  _____   ______  ______  __      ______    
 * /\  ___\/\_\_\_\/\__  _\/\  ___\/\ "-.\ \/\  __-./\  __ \/\  == \/\ \    /\  ___\
 * \ \  __\\/_/\_\/\/_/\ \/\ \  __\\ \ \-.  \ \ \/\ \ \  __ \ \  __<\ \ \___\ \  __\
 *  \ \_____\/\_\/\_\ \ \_\ \ \_____\ \_\\"\_\ \____-\ \_\ \_\ \_____\ \_____\ \_____\
 *   \/_____/\/_/\/_/  \/_/  \/_____/\/_/ \/_/\/____/ \/_/\/_/\/_____/\/_____/\/_____/
 *
 *  Base contract for Extensions in the Extendable Framework
 *  
 *  Inherit and implement this contract to create Extension contracts!
 *
 *  Implements the EIP-165 standard for interface detection of implementations during runtime.
 *  Uses the ERC165 singleton pattern where the actual implementation logic of the interface is
 *  deployed in a separate contract. See ERC165Logic. Deterministic deployment guarantees the
 *  ERC165Logic contract to always exist as static address 0x16C940672fA7820C36b2123E657029d982629070
 *
 *  Define your custom Extension interface and implement it whilst inheriting this contract:
 *      contract YourExtension is IYourExtension, Extension {...}
 *
 */
abstract contract Extension is CallerContext, IExtension, IERC165, IERC165Register {
    address constant ERC165LogicAddress = 0x16C940672fA7820C36b2123E657029d982629070;

    /**
     * @dev Constructor registers your custom Extension interface under EIP-165:
     *      https://eips.ethereum.org/EIPS/eip-165
    */
    constructor() {
        Interface[] memory interfaces = getInterface();
        for (uint256 i = 0; i < interfaces.length; i++) {
            Interface memory iface = interfaces[i];
            registerInterface(iface.interfaceId);

            for (uint256 j = 0; j < iface.functions.length; j++) {
                registerInterface(iface.functions[j]);
            }
        }

        registerInterface(type(IExtension).interfaceId);
    }

    function supportsInterface(bytes4 interfaceId) external override virtual returns(bool) {
        (bool success, bytes memory result) = ERC165LogicAddress.delegatecall(abi.encodeWithSignature("supportsInterface(bytes4)", interfaceId));

        if (!success) {
            assembly {
                revert(result, returndatasize())
            }
        }

        return abi.decode(result, (bool));
    }

    function registerInterface(bytes4 interfaceId) public override virtual {
        (bool success, ) = ERC165LogicAddress.delegatecall(abi.encodeWithSignature("registerInterface(bytes4)", interfaceId));

        if (!success) {
            assembly {
                returndatacopy(0, 0, returndatasize())
                revert(0, returndatasize())
            }
        }
    }

    /**
     * @dev Unidentified function signature calls to any Extension reverts with
     *      ExtensionNotImplemented error
    */
    function _fallback() internal virtual {
        revert ExtensionNotImplemented();
    }

    /**
     * @dev Fallback function passes to internal _fallback() logic
    */
    fallback() external payable virtual {
        _fallback();
    }
    
    /**
     * @dev Payable fallback function passes to internal _fallback() logic
    */
    receive() external payable virtual {
        _fallback();
    }

    /**
     * @dev Virtual override declaration of getFunctionSelectors() function to silence compiler
     *
     * Must be implemented in inherited contract.
    */
    function getInterface() override public virtual returns(Interface[] memory);
}

File 11 of 13 : IExtension.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

struct Interface {
    bytes4 interfaceId;
    bytes4[] functions;
}

/**
 * @dev Interface for Extension
*/
interface IExtension {
    /**
     * @dev Returns a full view of the functional interface of the extension
     *
     * Must return a list of the functions in the interface of your custom Extension
     * in the same format and syntax as in the interface itself as a string, 
     * escaped-newline separated.
     *
     * OPEN TO SUGGESTIONS FOR IMPROVEMENT ON THIS METHODOLOGY FOR 
     * DEEP DESCRIPTIVE RUNTIME INTROSPECTION
     *
     * Intent is to allow developers that want to integrate with an Extendable contract
     * that will have a constantly evolving interface, due to the nature of Extendables,
     * to be able to easily inspect and query for the current state of the interface and
     * integrate with it.
     *
     * See {ExtendLogic-getSolidityInterface} for an example.
    */
    function getSolidityInterface() external pure returns(string memory);

    /**
     * @dev Returns the interface IDs that are implemented by the Extension
     *
     * These are full interface IDs and ARE NOT function selectors. Full interface IDs are
     * XOR'd function selectors of an interface. For example the interface ID of the ERC721
     * interface is 0x80ac58cd determined by the XOR or all function selectors of the interface.
     * 
     * If an interface only consists of a single function, then the interface ID is identical
     * to that function selector.
     * 
     * Provides a simple abstraction from the developer for any custom Extension to 
     * be EIP-165 compliant out-of-the-box simply by implementing this function. 
     *
     * Excludes any functions either already described by other interface definitions
     * that are not developed on top of this backbone i.e. EIP-165, IExtension
    */
    function getInterface() external returns(Interface[] memory interfaces);
}

File 12 of 13 : CallerContext.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import {CallerState, CallerContextStorage} from "../storage/CallerContextStorage.sol";

/**
 * @dev CallerContext contract provides Extensions with proper caller-scoped contexts.
 *      Inherit this contract with your Extension to make use of caller references.
 *
 * `msg.sender` may not behave as developer intends when using within Extensions as many
 * calls may be exchanged between intra-contract extensions which result in a `msg.sender` as self.
 * Instead of using `msg.sender`, replace it with 
 *      - `_lastExternalCaller()` for the most recent caller in the call chain that is external to this contract
 *      - `_lastCaller()` for the most recent caller
 *
 * CallerContext provides a deep callstack to track the caller of the Extension/Extendable contract
 * at any point in the execution cycle.
 *
*/
contract CallerContext {
    /**
     * @dev Returns the most recent caller of this contract that came from outside this contract.
     *
     * Used by extensions that require fetching msg.sender that aren't cross-extension calls.
     * Cross-extension calls resolve msg.sender as the current contract and so the actual
     * caller context is obfuscated.
     * 
     * This function should be used in place of `msg.sender` where external callers are read.
     */
    function _lastExternalCaller() internal view returns(address) {
        CallerState storage state = CallerContextStorage._getState();

        for (uint i = state.callerStack.length - 1; i >= 0; i--) {
            address lastSubsequentCaller = state.callerStack[i];
            if (lastSubsequentCaller != address(this)) {
                return lastSubsequentCaller;
            }
        }

        revert("_lastExternalCaller: end of stack");
    }

    /**
     * @dev Returns the most recent caller of this contract.
     *
     * Last caller may also be the current contract.
     *
     * If the call is directly to the contract, without passing an Extendable, return `msg.sender` instead
     */
    function _lastCaller() internal view returns(address) {
        CallerState storage state = CallerContextStorage._getState();
        if (state.callerStack.length > 0)
            return state.callerStack[state.callerStack.length - 1];
        else
            return msg.sender;
    }
}

File 13 of 13 : IERC165Logic.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external returns (bool);
}


/**
 * @dev Storage based implementation of the {IERC165} interface.
 *
 * Uses Extendable storage pattern to populate the registered interfaces storage variable.
 */
interface IERC165Register {
    /**
     * @dev Registers the contract as an implementer of the interface defined by
     * `interfaceId`. Support of the actual ERC165 interface is automatic and
     * registering its interface id is not required.
     *
     * Requirements:
     *
     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
     */
    function registerInterface(bytes4 interfaceId) external;
}

Settings
{
  "metadata": {
    "bytecodeHash": "none"
  },
  "optimizer": {
    "enabled": true,
    "runs": 800
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address","name":"extendLogic","type":"address"},{"internalType":"address","name":"approveLogic","type":"address"},{"internalType":"address","name":"getterLogic","type":"address"},{"internalType":"address","name":"onReceiveLogic","type":"address"},{"internalType":"address","name":"transferLogic","type":"address"},{"internalType":"address","name":"hooksLogic","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ExtensionNotImplemented","type":"error"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"metadataGetterLogic","type":"address"},{"internalType":"address","name":"setTokenURILogic","type":"address"},{"internalType":"address","name":"mintLogic","type":"address"},{"internalType":"address","name":"burnLogic","type":"address"}],"name":"finaliseERC721MetadataExtending","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620010f4380380620010f4833981016040819052620000349162000a11565b87878787878787878787878787878787856200004f62000736565b6040516001600160a01b0382166024820181905260009160440160408051601f198184030181529181526020820180516001600160e01b0316638200571560e01b17905251620000a0919062000aeb565b600060405180830381855af49150503d8060008114620000dd576040519150601f19603f3d011682016040523d82523d6000602084013e620000e2565b606091505b5050905080620001395760405162461bcd60e51b815260206004820152601e60248201527f6661696c656420746f20696e697469616c69736520657874656e73696f6e000060448201526064015b60405180910390fd5b6200014362000773565b505060006200015c620007c760201b620002a41760201c565b89519091506200017390829060208c019062000874565b5087516200018b90600183019060208b019062000874565b506040516001600160a01b0387811660248301526000919089169060440160408051601f198184030181529181526020820180516001600160e01b0316638200571560e01b17905251620001e0919062000aeb565b600060405180830381855af49150503d80600081146200021d576040519150601f19603f3d011682016040523d82523d6000602084013e62000222565b606091505b5050905080620002755760405162461bcd60e51b815260206004820152601c60248201527f6661696c656420746f20696e697469616c69736520617070726f766500000000604482015260640162000130565b6040516001600160a01b038781166024830152600091908a169060440160408051601f198184030181529181526020820180516001600160e01b0316638200571560e01b17905251620002c9919062000aeb565b600060405180830381855af49150503d806000811462000306576040519150601f19603f3d011682016040523d82523d6000602084013e6200030b565b606091505b50509050806200035e5760405162461bcd60e51b815260206004820152601b60248201527f6661696c656420746f20696e697469616c697365206765747465720000000000604482015260640162000130565b6040516001600160a01b038781166024830152600091908b169060440160408051601f198184030181529181526020820180516001600160e01b0316638200571560e01b17905251620003b2919062000aeb565b600060405180830381855af49150503d8060008114620003ef576040519150601f19603f3d011682016040523d82523d6000602084013e620003f4565b606091505b5050905080620004475760405162461bcd60e51b815260206004820152601e60248201527f6661696c656420746f20696e697469616c697365206f6e526563656976650000604482015260640162000130565b6040516001600160a01b038781166024830152600091908c169060440160408051601f198184030181529181526020820180516001600160e01b0316638200571560e01b179052516200049b919062000aeb565b600060405180830381855af49150503d8060008114620004d8576040519150601f19603f3d011682016040523d82523d6000602084013e620004dd565b606091505b5050905080620005305760405162461bcd60e51b815260206004820152601d60248201527f6661696c656420746f20696e697469616c697365207472616e73666572000000604482015260640162000130565b6040516001600160a01b038781166024830152600091908d169060440160408051601f198184030181529181526020820180516001600160e01b0316638200571560e01b1790525162000584919062000aeb565b600060405180830381855af49150503d8060008114620005c1576040519150601f19603f3d011682016040523d82523d6000602084013e620005c6565b606091505b5050905080620006195760405162461bcd60e51b815260206004820152601a60248201527f6661696c656420746f20696e697469616c69736520686f6f6b73000000000000604482015260640162000130565b6040516380ac58cd60e01b60248201526000906001600160a01b038e169060440160408051601f198184030181529181526020820180516001600160e01b0316624299b760e71b1790525162000670919062000aeb565b600060405180830381855af49150503d8060008114620006ad576040519150601f19603f3d011682016040523d82523d6000602084013e620006b2565b606091505b5050905080620007115760405162461bcd60e51b815260206004820152602360248201527f6661696c656420746f2072656769737465722065726337323120696e7465726660448201526261636560e81b606482015260840162000130565b5050505050505050505050505050505050505050505050505050505050505062000b5b565b60006200074d6200082a60201b6200030c1760201c565b8054600181018255600091825260209091200180546001600160a01b0319163317905550565b60006200078a6200082a60201b6200030c1760201c565b905080600001805480620007a257620007a262000b09565b600082815260209020810160001990810180546001600160a01b031916905501905550565b6040516001600160601b03193060601b1660208201527f9e4673de1ccd04f1c4802d719ca4663f19655a024fdf4ebb6d488d3e26150fb5603482015260009081906054015b60408051601f19818403018152919052805160209091012092915050565b6040516001600160601b03193060601b1660208201527f37daa740f89c6d2d45c8cff54bcd79cd943b0b83a0445f091d1f2980355bda42603482015260009081906054016200080c565b828054620008829062000b1f565b90600052602060002090601f016020900481019282620008a65760008555620008f1565b82601f10620008c157805160ff1916838001178555620008f1565b82800160010185558215620008f1579182015b82811115620008f1578251825591602001919060010190620008d4565b50620008ff92915062000903565b5090565b5b80821115620008ff576000815560010162000904565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200094d57818101518382015260200162000933565b838111156200095d576000848401525b50505050565b600082601f8301126200097557600080fd5b81516001600160401b03808211156200099257620009926200091a565b604051601f8301601f19908116603f01168101908282118183101715620009bd57620009bd6200091a565b81604052838152866020858801011115620009d757600080fd5b620009ea84602083016020890162000930565b9695505050505050565b80516001600160a01b038116811462000a0c57600080fd5b919050565b600080600080600080600080610100898b03121562000a2f57600080fd5b88516001600160401b038082111562000a4757600080fd5b62000a558c838d0162000963565b995060208b015191508082111562000a6c57600080fd5b5062000a7b8b828c0162000963565b97505062000a8c60408a01620009f4565b955062000a9c60608a01620009f4565b945062000aac60808a01620009f4565b935062000abc60a08a01620009f4565b925062000acc60c08a01620009f4565b915062000adc60e08a01620009f4565b90509295985092959890939650565b6000825162000aff81846020870162000930565b9190910192915050565b634e487b7160e01b600052603160045260246000fd5b600181811c9082168062000b3457607f821691505b60208210810362000b5557634e487b7160e01b600052602260045260246000fd5b50919050565b6105898062000b6b6000396000f3fe6080604052600436106100225760003560e01c8063ca7f91c61461003957610031565b366100315761002f610059565b005b61002f610059565b34801561004557600080fd5b5061002f610054366004610502565b6100db565b600061006361035a565b600080356001600160e01b03191681526002820160205260409020549091506001600160a01b0316156100c257600080356001600160e01b03191681526002820160205260409020546100be906001600160a01b03166103a8565b5050565b60405163deba8f3160e01b815260040160405180910390fd5b604051638200571560e01b81526001600160a01b038516600482015230908190638200571590602401600060405180830381600087803b15801561011e57600080fd5b505af1158015610132573d6000803e3d6000fd5b5050604051638200571560e01b81526001600160a01b0387811660048301528416925063820057159150602401600060405180830381600087803b15801561017957600080fd5b505af115801561018d573d6000803e3d6000fd5b5050604051638200571560e01b81526001600160a01b0386811660048301528416925063820057159150602401600060405180830381600087803b1580156101d457600080fd5b505af11580156101e8573d6000803e3d6000fd5b5050604051638200571560e01b81526001600160a01b0385811660048301528416925063820057159150602401600060405180830381600087803b15801561022f57600080fd5b505af1158015610243573d6000803e3d6000fd5b5050604051624299b760e71b8152635b5e139f60e01b600482015230925063214cdb809150602401600060405180830381600087803b15801561028557600080fd5b505af1158015610299573d6000803e3d6000fd5b505050505050505050565b6040516bffffffffffffffffffffffff193060601b1660208201527f9e4673de1ccd04f1c4802d719ca4663f19655a024fdf4ebb6d488d3e26150fb5603482015260009081906054015b60408051601f19818403018152919052805160209091012092915050565b6040516bffffffffffffffffffffffff193060601b1660208201527f37daa740f89c6d2d45c8cff54bcd79cd943b0b83a0445f091d1f2980355bda42603482015260009081906054016102ee565b6040516bffffffffffffffffffffffff193060601b1660208201527fe9d24eefd6250c29f1cd34b6c384f27bb25695909ab2fd82aa36ff6acd07cc63603482015260009081906054016102ee565b60006103b2610458565b6060600080846001600160a01b03166000366040516103d2929190610556565b600060405180830381855af49150503d806000811461040d576040519150601f19603f3d011682016040523d82523d6000602084013e610412565b606091505b509150915061041f610495565b3d6000843e816104545760208101516001600160e01b03191663deba8f3160e01b0361045057506000949350505050565b3d83fd5b3d83f35b600061046261030c565b80546001810182556000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19163317905550565b600061049f61030c565b9050806000018054806104b4576104b4610566565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905550565b80356001600160a01b03811681146104fd57600080fd5b919050565b6000806000806080858703121561051857600080fd5b610521856104e6565b935061052f602086016104e6565b925061053d604086016104e6565b915061054b606086016104e6565b905092959194509250565b8183823760009101908152919050565b634e487b7160e01b600052603160045260246000fdfea164736f6c634300080d000a000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000004de97b1669ceed6ef9f38a6a76dd982d394810c4000000000000000000000000a796299b72ceca35f91107278fdeed56d9f882a9000000000000000000000000267ab9245a056730c92a54f447b1522ee7412ad4000000000000000000000000e7d118354e726f1cd1e004a2db90b771adba3588000000000000000000000000ef8894089c991cf9c009cd66f7f2fb9dc0e2fb190000000000000000000000006f474fd17c1b34e88ece3fa6a37da6d2363b34f0000000000000000000000000000000000000000000000000000000000000001048756d616e626f756e6420546f6b656e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034842540000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106100225760003560e01c8063ca7f91c61461003957610031565b366100315761002f610059565b005b61002f610059565b34801561004557600080fd5b5061002f610054366004610502565b6100db565b600061006361035a565b600080356001600160e01b03191681526002820160205260409020549091506001600160a01b0316156100c257600080356001600160e01b03191681526002820160205260409020546100be906001600160a01b03166103a8565b5050565b60405163deba8f3160e01b815260040160405180910390fd5b604051638200571560e01b81526001600160a01b038516600482015230908190638200571590602401600060405180830381600087803b15801561011e57600080fd5b505af1158015610132573d6000803e3d6000fd5b5050604051638200571560e01b81526001600160a01b0387811660048301528416925063820057159150602401600060405180830381600087803b15801561017957600080fd5b505af115801561018d573d6000803e3d6000fd5b5050604051638200571560e01b81526001600160a01b0386811660048301528416925063820057159150602401600060405180830381600087803b1580156101d457600080fd5b505af11580156101e8573d6000803e3d6000fd5b5050604051638200571560e01b81526001600160a01b0385811660048301528416925063820057159150602401600060405180830381600087803b15801561022f57600080fd5b505af1158015610243573d6000803e3d6000fd5b5050604051624299b760e71b8152635b5e139f60e01b600482015230925063214cdb809150602401600060405180830381600087803b15801561028557600080fd5b505af1158015610299573d6000803e3d6000fd5b505050505050505050565b6040516bffffffffffffffffffffffff193060601b1660208201527f9e4673de1ccd04f1c4802d719ca4663f19655a024fdf4ebb6d488d3e26150fb5603482015260009081906054015b60408051601f19818403018152919052805160209091012092915050565b6040516bffffffffffffffffffffffff193060601b1660208201527f37daa740f89c6d2d45c8cff54bcd79cd943b0b83a0445f091d1f2980355bda42603482015260009081906054016102ee565b6040516bffffffffffffffffffffffff193060601b1660208201527fe9d24eefd6250c29f1cd34b6c384f27bb25695909ab2fd82aa36ff6acd07cc63603482015260009081906054016102ee565b60006103b2610458565b6060600080846001600160a01b03166000366040516103d2929190610556565b600060405180830381855af49150503d806000811461040d576040519150601f19603f3d011682016040523d82523d6000602084013e610412565b606091505b509150915061041f610495565b3d6000843e816104545760208101516001600160e01b03191663deba8f3160e01b0361045057506000949350505050565b3d83fd5b3d83f35b600061046261030c565b80546001810182556000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19163317905550565b600061049f61030c565b9050806000018054806104b4576104b4610566565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905550565b80356001600160a01b03811681146104fd57600080fd5b919050565b6000806000806080858703121561051857600080fd5b610521856104e6565b935061052f602086016104e6565b925061053d604086016104e6565b915061054b606086016104e6565b905092959194509250565b8183823760009101908152919050565b634e487b7160e01b600052603160045260246000fdfea164736f6c634300080d000a

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000004de97b1669ceed6ef9f38a6a76dd982d394810c4000000000000000000000000a796299b72ceca35f91107278fdeed56d9f882a9000000000000000000000000267ab9245a056730c92a54f447b1522ee7412ad4000000000000000000000000e7d118354e726f1cd1e004a2db90b771adba3588000000000000000000000000ef8894089c991cf9c009cd66f7f2fb9dc0e2fb190000000000000000000000006f474fd17c1b34e88ece3fa6a37da6d2363b34f0000000000000000000000000000000000000000000000000000000000000001048756d616e626f756e6420546f6b656e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034842540000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): Humanbound Token
Arg [1] : symbol_ (string): HBT
Arg [2] : extendLogic (address): 0x4DE97B1669CeEd6EF9F38a6a76Dd982D394810c4
Arg [3] : approveLogic (address): 0xA796299B72CeCA35f91107278FdeeD56d9f882A9
Arg [4] : getterLogic (address): 0x267ab9245a056730c92A54F447b1522eE7412Ad4
Arg [5] : onReceiveLogic (address): 0xE7d118354e726F1cd1E004a2DB90B771AdbA3588
Arg [6] : transferLogic (address): 0xEF8894089c991CF9c009Cd66F7F2fb9dC0e2fB19
Arg [7] : hooksLogic (address): 0x6f474Fd17C1B34e88eCE3fA6a37da6d2363b34F0

-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [2] : 0000000000000000000000004de97b1669ceed6ef9f38a6a76dd982d394810c4
Arg [3] : 000000000000000000000000a796299b72ceca35f91107278fdeed56d9f882a9
Arg [4] : 000000000000000000000000267ab9245a056730c92a54f447b1522ee7412ad4
Arg [5] : 000000000000000000000000e7d118354e726f1cd1e004a2db90b771adba3588
Arg [6] : 000000000000000000000000ef8894089c991cf9c009cd66f7f2fb9dc0e2fb19
Arg [7] : 0000000000000000000000006f474fd17c1b34e88ece3fa6a37da6d2363b34f0
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000010
Arg [9] : 48756d616e626f756e6420546f6b656e00000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [11] : 4842540000000000000000000000000000000000000000000000000000000000


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.