IHats

Git Source

Inherits: IHatsIdUtilities, HatsErrors, HatsEvents

Functions

mintTopHat

function mintTopHat(address _target, string memory _details, string memory _imageURI)
    external
    returns (uint256 topHatId);

createHat

function createHat(
    uint256 _admin,
    string calldata _details,
    uint32 _maxSupply,
    address _eligibility,
    address _toggle,
    bool _mutable,
    string calldata _imageURI
) external returns (uint256 newHatId);

batchCreateHats

function batchCreateHats(
    uint256[] calldata _admins,
    string[] calldata _details,
    uint32[] calldata _maxSupplies,
    address[] memory _eligibilityModules,
    address[] memory _toggleModules,
    bool[] calldata _mutables,
    string[] calldata _imageURIs
) external returns (bool success);

getNextId

function getNextId(uint256 _admin) external view returns (uint256 nextId);

mintHat

function mintHat(uint256 _hatId, address _wearer) external returns (bool success);

batchMintHats

function batchMintHats(uint256[] calldata _hatIds, address[] calldata _wearers) external returns (bool success);

setHatStatus

function setHatStatus(uint256 _hatId, bool _newStatus) external returns (bool toggled);

checkHatStatus

function checkHatStatus(uint256 _hatId) external returns (bool toggled);

setHatWearerStatus

function setHatWearerStatus(uint256 _hatId, address _wearer, bool _eligible, bool _standing)
    external
    returns (bool updated);

checkHatWearerStatus

function checkHatWearerStatus(uint256 _hatId, address _wearer) external returns (bool updated);

renounceHat

function renounceHat(uint256 _hatId) external;

transferHat

function transferHat(uint256 _hatId, address _from, address _to) external;

makeHatImmutable

function makeHatImmutable(uint256 _hatId) external;

changeHatDetails

function changeHatDetails(uint256 _hatId, string memory _newDetails) external;

changeHatEligibility

function changeHatEligibility(uint256 _hatId, address _newEligibility) external;

changeHatToggle

function changeHatToggle(uint256 _hatId, address _newToggle) external;

changeHatImageURI

function changeHatImageURI(uint256 _hatId, string memory _newImageURI) external;

changeHatMaxSupply

function changeHatMaxSupply(uint256 _hatId, uint32 _newMaxSupply) external;

requestLinkTopHatToTree

function requestLinkTopHatToTree(uint32 _topHatId, uint256 _newAdminHat) external;

approveLinkTopHatToTree

function approveLinkTopHatToTree(
    uint32 _topHatId,
    uint256 _newAdminHat,
    address _eligibility,
    address _toggle,
    string calldata _details,
    string calldata _imageURI
) external;

unlinkTopHatFromTree

function unlinkTopHatFromTree(uint32 _topHatId, address _wearer) external;

relinkTopHatWithinTree

function relinkTopHatWithinTree(
    uint32 _topHatDomain,
    uint256 _newAdminHat,
    address _eligibility,
    address _toggle,
    string calldata _details,
    string calldata _imageURI
) external;

viewHat

function viewHat(uint256 _hatId)
    external
    view
    returns (
        string memory details,
        uint32 maxSupply,
        uint32 supply,
        address eligibility,
        address toggle,
        string memory imageURI,
        uint16 lastHatId,
        bool mutable_,
        bool active
    );

isWearerOfHat

function isWearerOfHat(address _user, uint256 _hatId) external view returns (bool isWearer);

isAdminOfHat

function isAdminOfHat(address _user, uint256 _hatId) external view returns (bool isAdmin);

isInGoodStanding

function isInGoodStanding(address _wearer, uint256 _hatId) external view returns (bool standing);

isEligible

function isEligible(address _wearer, uint256 _hatId) external view returns (bool eligible);

getHatEligibilityModule

function getHatEligibilityModule(uint256 _hatId) external view returns (address eligibility);

getHatToggleModule

function getHatToggleModule(uint256 _hatId) external view returns (address toggle);

getHatMaxSupply

function getHatMaxSupply(uint256 _hatId) external view returns (uint32 maxSupply);

hatSupply

function hatSupply(uint256 _hatId) external view returns (uint32 supply);

getImageURIForHat

function getImageURIForHat(uint256 _hatId) external view returns (string memory _uri);

balanceOf

function balanceOf(address wearer, uint256 hatId) external view returns (uint256 balance);

balanceOfBatch

function balanceOfBatch(address[] calldata _wearers, uint256[] calldata _hatIds)
    external
    view
    returns (uint256[] memory);

uri

function uri(uint256 id) external view returns (string memory _uri);