Blockwell

BFH:Sphere

About

Stats

Public Functions 44
Event Types 18
Code Size 27,842 bytes

Approval Event

Parameters help
_owner
address help
_approved
address help
_tokenId
uint256 help

ApprovalForAll Event

Parameters help
_owner
address help
_operator
address help
_approved
bool help

MinterAdded Event

Parameters help
account
address help

MinterRemoved Event

Parameters help
account
address help

OperatorAdded Event

Parameters help
account
address help

OperatorRemoved Event

Parameters help
account
address help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Paused Event

Parameters help
account
address help

SetTypeCap Event

Parameters help
_typeCap
uint256 help

SetUnitCap Event

Parameters help
_assetType
uint32 help
_unitCap
uint32 help

TokenPaused Event

Parameters help
tokenId
uint256 help

TokenPauserAdded Event

Parameters help
account
address help

TokenPauserRemoved Event

Parameters help
account
address help

TokenUnpaused Event

Parameters help
tokenId
uint256 help

Transfer Event

Parameters help
_from
address help
_to
address help
_tokenId
uint256 help

Unpaused Event

Parameters help
account
address help

UpdateApprovalProxy Event

Parameters help
_newProxyContract
address help

UpdateTokenURIPrefix Event

Parameters help
tokenUriPrefix
string help

Functions Expand All Collapse All

supportsInterface keyboard_arrow_up

Parameters help

Name Type
interfaceId
bytes4 help

Properties

Visibility help public
Mutability help view
Source Code
    function supportsInterface(bytes4 interfaceId) external view returns (bool) {
        return _supportedInterfaces[interfaceId];
    }

owner keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function owner() public view returns (address) {
        return _owner;
    }

transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
    function transferOwnership(address _newOwner) public onlyOperator() {
        _transferOwnership(_newOwner);
    }

isOperator keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help view
Source Code
    function isOperator(address account) public view returns (bool) {
        return operators.has(account);
    }

addOperator keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
    function addOperator(address account) public onlyOperator() {
        operators.add(account);
        emit OperatorAdded(account);
    }

removeOperator keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
    function removeOperator(address account) public onlyOperator() {
        operators.remove(account);
        emit OperatorRemoved(account);
    }

paused keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function paused() public view returns (bool) {
        return _paused;
    }

pause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
    function pause() public onlyOperator() whenNotPaused() {
        _paused = true;
        emit Paused(msg.sender);
    }

unpause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
    function unpause() public onlyOperator() whenPaused() {
        _paused = false;
        emit Unpaused(msg.sender);
    }

withdrawEther keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
    function withdrawEther() public onlyOperator() {
        msg.sender.transfer(address(this).balance);
    }

balanceOf keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help view
Source Code
    function balanceOf(address _owner) public view returns (uint256) {
        return _balance[_owner];
    }

ownerOf keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

null
Source Code
    function ownerOf(uint256 _tokenId) public view returns (address) {
        require(_exist(_tokenId),
                "`_tokenId` is not a valid NFT.");
        return _tokenOwner[_tokenId];
    }

safeTransferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_tokenId
uint256 help
_data
bytes help

Properties

Visibility help public
Mutability help payable
Source Code
    function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory _data) public payable
                            whenNotPaused() whenNotTokenPaused(_tokenId) {
        super.safeTransferFrom(_from, _to, _tokenId, _data);
    }

safeTransferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_tokenId
uint256 help

Properties

Visibility help public
Mutability help payable
Source Code
    function safeTransferFrom(address _from, address _to, uint256 _tokenId) public payable
                            whenNotPaused() whenNotTokenPaused(_tokenId) {
        super.safeTransferFrom(_from, _to, _tokenId);
    }

transferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_tokenId
uint256 help

Properties

Visibility help public
Mutability help payable
Source Code
    function transferFrom(address _from, address _to, uint256 _tokenId) public payable
                            whenNotPaused() whenNotTokenPaused(_tokenId) {
        super.transferFrom(_from, _to, _tokenId);
    }

approve keyboard_arrow_up

Parameters help

Name Type
_approved
address help
_tokenId
uint256 help

Properties

Visibility help public
Mutability help payable

Requirements help

Source Code
    function approve(address _approved, uint256 _tokenId) public payable {
        address owner = ownerOf(_tokenId);
        require(msg.sender == owner || isApprovedForAll(owner, msg.sender),
                "Unless `msg.sender` is the current NFT owner, or an authorized operator of the current owner.");

        _tokenApproved[_tokenId] = _approved;
        emit Approval(msg.sender, _approved, _tokenId);
    }

setApprovalForAll keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_approved
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
    function setApprovalForAll(address _spender, bool _approved) public {
        if (address(approvalProxy) != address(0x0) && _spender.isContract()) {
            approvalProxy.setApprovalForAll(msg.sender, _spender, _approved);
        }
        super.setApprovalForAll(_spender, _approved);
    }

getApproved keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

null
Source Code
    function getApproved(uint256 _tokenId) public view returns (address) {
        require(_exist(_tokenId),
                "`_tokenId` is not a valid NFT.");
        return _tokenApproved[_tokenId];
    }

isApprovedForAll keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

Visibility help public
Mutability help view
Source Code
    function isApprovedForAll(address _owner, address _spender) public view returns (bool) {
        bool original = super.isApprovedForAll(_owner, _spender);
        if (address(approvalProxy) != address(0x0)) {
            return approvalProxy.isApprovedForAll(_owner, _spender, original);
        }
        return original;
    }

setTokenURIPrefix keyboard_arrow_up

Parameters help

Name Type
_tokenUriPrefix
string help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
    function setTokenURIPrefix(string memory _tokenUriPrefix) public onlyOperator() {
        __tokenUriPrefix = _tokenUriPrefix;
        emit UpdateTokenURIPrefix(_tokenUriPrefix);
    }

name keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function name() public view returns (string memory) {
        return __name;
    }

symbol keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function symbol() public view returns (string memory) {
        return __symbol;
    }

tokenURI keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
    function tokenURI(uint256 _tokenId) public view returns (string memory) {
        return __tokenUriPrefix.concat(_tokenId.toString());
    }

isMinter keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help view
Source Code
    function isMinter(address account) public view returns (bool) {
        return minters.has(account);
    }

addMinter keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
    function addMinter(address account) public onlyOperator() {
        minters.add(account);
        emit MinterAdded(account);
    }

removeMinter keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
    function removeMinter(address account) public onlyOperator() {
        minters.remove(account);
        emit MinterRemoved(account);
    }

exist keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
    function exist(uint256 tokenId) public view returns (bool) {
        return _exist(tokenId);
    }

mint keyboard_arrow_up

Parameters help

Name Type
_to
address help
_tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyMinter checks for the following:
null
Source Code
    function mint(address _to, uint256 _tokenId) public onlyMinter() {
        require(_tokenId.mod(assetTypeOffset) != 0, "Index must not be 0");
        uint32 assetType = uint32(_tokenId.div(assetTypeOffset));
        unitCount[assetType] = unitCount[assetType].add(1);
        totalCount = totalCount.add(1);
        require(unitCount[assetType] <= getUnitCap(assetType), "Asset unit cap is exceed");
        super.mint(_to, _tokenId);
    }

totalSupply keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function totalSupply() public view returns (uint256) {
        return totalCount;
    }

getTypeOffset keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function getTypeOffset() public view returns (uint256) {
        return assetTypeOffset;
    }

setTypeCap keyboard_arrow_up

Parameters help

Name Type
_newTypeCap
uint32 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyMinter checks for the following:
null
Source Code
    function setTypeCap(uint32 _newTypeCap) public onlyMinter() {
        require(_newTypeCap < assetTypeCap, "New type cap cannot be less than existing type cap");
        require(_newTypeCap >= assetTypeCount, "New type cap must be more than current type count");
        assetTypeCap = _newTypeCap;
        emit SetTypeCap(_newTypeCap);
    }

getTypeCap keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function getTypeCap() public view returns (uint256) {
        return assetTypeCap;
    }

getTypeCount keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function getTypeCount() public view returns (uint256) {
        return assetTypeCount;
    }

existingType keyboard_arrow_up

Parameters help

Name Type
_assetType
uint32 help

Properties

Visibility help public
Mutability help view
Source Code
    function existingType(uint32 _assetType) public view returns (bool) {
        return unitCapIsSet[_assetType];
    }

setUnitCap keyboard_arrow_up

Parameters help

Name Type
_assetType
uint32 help
_newUnitCap
uint32 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyMinter checks for the following:
null
Source Code
    function setUnitCap(uint32 _assetType, uint32 _newUnitCap) public onlyMinter() {
        require(_assetType != 0, "Asset Type must not be 0");
        require(_newUnitCap < assetTypeOffset, "New unit cap must be less than asset type offset");

        if (!existingType(_assetType)) {
            unitCapIsSet[_assetType] = true;
            assetTypeCount = assetTypeCount.add(1);
            require(assetTypeCount <= assetTypeCap, "Asset type cap is exceeded");
        } else {
            require(_newUnitCap < getUnitCap(_assetType), "New unit cap must be less than previous unit cap");
            require(_newUnitCap >= getUnitCount(_assetType), "New unit cap must be more than current unit count");
        }

        unitCap[_assetType] = _newUnitCap;
        emit SetUnitCap(_assetType, _newUnitCap);
    }

getUnitCap keyboard_arrow_up

Parameters help

Name Type
_assetType
uint32 help

Properties

Visibility help public
Mutability help view

Requirements help

null
Source Code
    function getUnitCap(uint32 _assetType) public view returns (uint32) {
        require(existingType(_assetType), "Asset type does not exist");
        return unitCap[_assetType];
    }

getUnitCount keyboard_arrow_up

Parameters help

Name Type
_assetType
uint32 help

Properties

Visibility help public
Mutability help view
Source Code
    function getUnitCount(uint32 _assetType) public view returns (uint32) {
        return unitCount[_assetType];
    }

pauseToken keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyTokenPauser checks for the following:
null

Requirements help

Source Code
    function pauseToken(uint256 _tokenId) public onlyTokenPauser() {
        require(!isTokenPaused(_tokenId), "Token is already paused");
        _tokenPaused[_tokenId] = true;
        emit TokenPaused(_tokenId);
    }

unpauseToken keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyTokenPauser checks for the following:
null

Requirements help

null
Source Code
    function unpauseToken(uint256 _tokenId) public onlyTokenPauser() {
        require(isTokenPaused(_tokenId), "Token is not paused");
        _tokenPaused[_tokenId] = false;
        emit TokenUnpaused(_tokenId);
    }

isTokenPaused keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
    function isTokenPaused(uint256 _tokenId) public view returns (bool) {
        return _tokenPaused[_tokenId];
    }

isTokenPauser keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help view
Source Code
    function isTokenPauser(address account) public view returns (bool) {
        return tokenPauser.has(account);
    }

addTokenPauser keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
    function addTokenPauser(address account) public onlyOperator() {
        tokenPauser.add(account);
        emit TokenPauserAdded(account);
    }

removeTokenPauser keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
    function removeTokenPauser(address account) public onlyOperator() {
        tokenPauser.remove(account);
        emit TokenPauserRemoved(account);
    }

setApprovalProxy keyboard_arrow_up

Parameters help

Name Type
_new
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
    function setApprovalProxy(address _new) public onlyOperator() {
        approvalProxy = IApprovalProxy(_new);
        emit UpdateApprovalProxy(_new);
    }