Blockwell

KnownOriginDigitalAsset

About

Stats

Public Functions 74
Event Types 12
Code Size 68,524 bytes

Library Use

Uses SafeMath for uint256.

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

EditionCreated Event

Parameters help
_editionNumber
uint256 help
_editionData
bytes32 help
_editionType
uint256 help

Minted Event

Parameters help
_tokenId
uint256 help
_editionNumber
uint256 help
_buyer
address help

OwnershipRenounced Event

Parameters help
previousOwner
address help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Pause Event

Parameters help

Purchase Event

Parameters help
_tokenId
uint256 help
_editionNumber
uint256 help
_buyer
address help
_priceInWei
uint256 help

RoleAdded Event

Parameters help
operator
address help
role
uint8 help

RoleRemoved Event

Parameters help
operator
address help
role
uint8 help

Transfer Event

Parameters help
_from
address help
_to
address help
_tokenId
uint256 help

Unpause Event

Parameters help

CommissionSplit Event

Members
rate
uint256 help
recipient
address help

EditionDetails Event

Members
editionNumber
uint256 help
editionData
bytes32 help
editionType
uint256 help
startDate
uint256 help
endDate
uint256 help
artistAccount
address help
artistCommission
uint256 help
priceInWei
uint256 help
tokenURI
string help
active
bool help
totalSupply
uint256 help
totalAvailable
uint256 help

Functions Expand All Collapse All

renounceOwnership keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
  function renounceOwnership() public onlyOwner {
    emit OwnershipRenounced(owner);
    owner = address(0);
  }

transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
  function transferOwnership(address _newOwner) public onlyOwner {
    _transferOwnership(_newOwner);
  }

pause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
  function pause() public onlyOwner whenNotPaused {
    paused = true;
    emit Pause();
  }

unpause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
  function unpause() public onlyOwner whenPaused {
    paused = false;
    emit Unpause();
  }

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
  function() external {
  }

reclaimEther keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
  function reclaimEther() external onlyOwner {
    owner.transfer(address(this).balance);
  }

addAddressToAccessControl keyboard_arrow_up

Parameters help

Name Type
_operator
address help
_role
uint8 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
  function addAddressToAccessControl(address _operator, uint8 _role)
  public
  onlyIfKnownOrigin
  {
    roles[_role].add(_operator);
    emit RoleAdded(_operator, _role);
  }

removeAddressFromAccessControl keyboard_arrow_up

Parameters help

Name Type
_operator
address help
_role
uint8 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
  function removeAddressFromAccessControl(address _operator, uint8 _role)
  public
  onlyIfKnownOrigin
  {
    roles[_role].remove(_operator);
    emit RoleRemoved(_operator, _role);
  }

checkRole keyboard_arrow_up

Parameters help

Name Type
_operator
address help
_role
uint8 help

Properties

Visibility help public
Mutability help view
Source Code
  function checkRole(address _operator, uint8 _role)
  public
  view
  {
    roles[_role].check(_operator);
  }

hasRole keyboard_arrow_up

Parameters help

Name Type
_operator
address help
_role
uint8 help

Properties

Visibility help public
Mutability help view
Source Code
  function hasRole(address _operator, uint8 _role)
  public
  view
  returns (bool)
  {
    return roles[_role].has(_operator);
  }

balanceOf keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
  function balanceOf(address _owner) public view returns (uint256) {
    require(_owner != address(0));
    return ownedTokensCount[_owner];
  }

ownerOf keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
  function ownerOf(uint256 _tokenId) public view returns (address) {
    address owner = tokenOwner[_tokenId];
    require(owner != address(0));
    return owner;
  }

exists keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function exists(uint256 _tokenId) public view returns (bool) {
    address owner = tokenOwner[_tokenId];
    return owner != address(0);
  }

approve keyboard_arrow_up

Parameters help

Name Type
_to
address help
_tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
  function approve(address _to, uint256 _tokenId) public {
    address owner = ownerOf(_tokenId);
    require(_to != owner);
    require(msg.sender == owner || isApprovedForAll(owner, msg.sender));

    tokenApprovals[_tokenId] = _to;
    emit Approval(owner, _to, _tokenId);
  }

getApproved keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function getApproved(uint256 _tokenId) public view returns (address) {
    return tokenApprovals[_tokenId];
  }

setApprovalForAll keyboard_arrow_up

Parameters help

Name Type
_to
address help
_approved
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
  function setApprovalForAll(address _to, bool _approved) public {
    require(_to != msg.sender);
    operatorApprovals[msg.sender][_to] = _approved;
    emit ApprovalForAll(msg.sender, _to, _approved);
  }

isApprovedForAll keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_operator
address help

Properties

Visibility help public
Mutability help view
Source Code
  function isApprovedForAll(
    address _owner,
    address _operator
  )
    public
    view
    returns (bool)
  {
    return operatorApprovals[_owner][_operator];
  }

transferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

null
Source Code
  function transferFrom(
    address _from,
    address _to,
    uint256 _tokenId
  )
    public
  {
    require(isApprovedOrOwner(msg.sender, _tokenId));
    require(_from != address(0));
    require(_to != address(0));

    clearApproval(_from, _tokenId);
    removeTokenFrom(_from, _tokenId);
    addTokenTo(_to, _tokenId);

    emit Transfer(_from, _to, _tokenId);
  }

safeTransferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

null
null
Source Code
  function safeTransferFrom(
    address _from,
    address _to,
    uint256 _tokenId
  )
    public
  {
    // solium-disable-next-line arg-overflow
    safeTransferFrom(_from, _to, _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 transaction

Requirements help

null
null
Source Code
  function safeTransferFrom(
    address _from,
    address _to,
    uint256 _tokenId,
    bytes _data
  )
    public
  {
    transferFrom(_from, _to, _tokenId);
    // solium-disable-next-line arg-overflow
    require(checkAndCallSafeTransfer(_from, _to, _tokenId, _data));
  }

name keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

symbol keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

tokenURI keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Modifiers help

onlyValidTokenId checks for the following:
null
Source Code
  function tokenURI(uint256 _tokenId) public view onlyValidTokenId(_tokenId) returns (string) {
    return Strings.strConcat(tokenBaseURI, tokenURIs[_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 allTokens.length;
  }

tokenOfOwnerByIndex keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_index
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function tokenOfOwnerByIndex(
    address _owner,
    uint256 _index
  )
    public
    view
    returns (uint256)
  {
    require(_index < balanceOf(_owner));
    return ownedTokens[_owner][_index];
  }

tokenByIndex keyboard_arrow_up

Parameters help

Name Type
_index
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
  function tokenByIndex(uint256 _index) public view returns (uint256) {
    require(_index < totalSupply());
    return allTokens[_index];
  }

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];
  }

createActiveEdition keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_editionData
bytes32 help
_editionType
uint256 help
_startDate
uint256 help
_endDate
uint256 help
_artistAccount
address help
_artistCommission
uint256 help
_priceInWei
uint256 help
_tokenURI
string help
_totalAvailable
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
  function createActiveEdition(
    uint256 _editionNumber,
    bytes32 _editionData,
    uint256 _editionType,
    uint256 _startDate,
    uint256 _endDate,
    address _artistAccount,
    uint256 _artistCommission,
    uint256 _priceInWei,
    string _tokenURI,
    uint256 _totalAvailable
  )
  public
  onlyIfKnownOrigin
  returns (bool)
  {
    return _createEdition(_editionNumber, _editionData, _editionType, _startDate, _endDate, _artistAccount, _artistCommission, _priceInWei, _tokenURI, _totalAvailable, true);
  }

createInactiveEdition keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_editionData
bytes32 help
_editionType
uint256 help
_startDate
uint256 help
_endDate
uint256 help
_artistAccount
address help
_artistCommission
uint256 help
_priceInWei
uint256 help
_tokenURI
string help
_totalAvailable
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
  function createInactiveEdition(
    uint256 _editionNumber,
    bytes32 _editionData,
    uint256 _editionType,
    uint256 _startDate,
    uint256 _endDate,
    address _artistAccount,
    uint256 _artistCommission,
    uint256 _priceInWei,
    string _tokenURI,
    uint256 _totalAvailable
  )
  public
  onlyIfKnownOrigin
  returns (bool)
  {
    return _createEdition(_editionNumber, _editionData, _editionType, _startDate, _endDate, _artistAccount, _artistCommission, _priceInWei, _tokenURI, _totalAvailable, false);
  }

createActivePreMintedEdition keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_editionData
bytes32 help
_editionType
uint256 help
_startDate
uint256 help
_endDate
uint256 help
_artistAccount
address help
_artistCommission
uint256 help
_priceInWei
uint256 help
_tokenURI
string help
_totalSupply
uint256 help
_totalAvailable
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
  function createActivePreMintedEdition(
    uint256 _editionNumber,
    bytes32 _editionData,
    uint256 _editionType,
    uint256 _startDate,
    uint256 _endDate,
    address _artistAccount,
    uint256 _artistCommission,
    uint256 _priceInWei,
    string _tokenURI,
    uint256 _totalSupply,
    uint256 _totalAvailable
  )
  public
  onlyIfKnownOrigin
  returns (bool)
  {
    _createEdition(_editionNumber, _editionData, _editionType, _startDate, _endDate, _artistAccount, _artistCommission, _priceInWei, _tokenURI, _totalAvailable, true);
    updateTotalSupply(_editionNumber, _totalSupply);
    return true;
  }

createInactivePreMintedEdition keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_editionData
bytes32 help
_editionType
uint256 help
_startDate
uint256 help
_endDate
uint256 help
_artistAccount
address help
_artistCommission
uint256 help
_priceInWei
uint256 help
_tokenURI
string help
_totalSupply
uint256 help
_totalAvailable
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
  function createInactivePreMintedEdition(
    uint256 _editionNumber,
    bytes32 _editionData,
    uint256 _editionType,
    uint256 _startDate,
    uint256 _endDate,
    address _artistAccount,
    uint256 _artistCommission,
    uint256 _priceInWei,
    string _tokenURI,
    uint256 _totalSupply,
    uint256 _totalAvailable
  )
  public
  onlyIfKnownOrigin
  returns (bool)
  {
    _createEdition(_editionNumber, _editionData, _editionType, _startDate, _endDate, _artistAccount, _artistCommission, _priceInWei, _tokenURI, _totalAvailable, false);
    updateTotalSupply(_editionNumber, _totalSupply);
    return true;
  }

purchase keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help payable
Source Code
  function purchase(uint256 _editionNumber)
  public
  payable
  returns (uint256) {
    return purchaseTo(msg.sender, _editionNumber);
  }

purchaseTo keyboard_arrow_up

Parameters help

Name Type
_to
address help
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help payable
Source Code
  function purchaseTo(address _to, uint256 _editionNumber)
  public
  payable
  whenNotPaused
  onlyRealEdition(_editionNumber)
  onlyActiveEdition(_editionNumber)
  onlyAvailableEdition(_editionNumber)
  onlyPurchaseDuringWindow(_editionNumber)
  returns (uint256) {

    EditionDetails storage _editionDetails = editionNumberToEditionDetails[_editionNumber];
    require(msg.value >= _editionDetails.priceInWei, "Value must be greater than price of edition");

    // Construct next token ID e.g. 100000 + 1 = ID of 100001 (this first in the edition set)
    uint256 _tokenId = _nextTokenId(_editionNumber);

    // Create the token
    _mintToken(_to, _tokenId, _editionNumber, _editionDetails.tokenURI);

    // Splice funds and handle commissions
    _handleFunds(_editionNumber, _editionDetails.priceInWei, _editionDetails.artistAccount, _editionDetails.artistCommission);

    // Broadcast purchase
    emit Purchase(_tokenId, _editionNumber, _to, msg.value);

    return _tokenId;
  }

mint keyboard_arrow_up

Parameters help

Name Type
_to
address help
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
  function mint(address _to, uint256 _editionNumber)
  public
  onlyIfMinter
  onlyRealEdition(_editionNumber)
  onlyAvailableEdition(_editionNumber)
  returns (uint256) {
    // Construct next token ID e.g. 100000 + 1 = ID of 100001 (this first in the edition set)
    uint256 _tokenId = _nextTokenId(_editionNumber);

    // Create the token
    _mintToken(_to, _tokenId, _editionNumber, editionNumberToEditionDetails[_editionNumber].tokenURI);

    // Create the token
    return _tokenId;
  }

underMint keyboard_arrow_up

Parameters help

Name Type
_to
address help
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
  function underMint(address _to, uint256 _editionNumber)
  public
  onlyIfUnderMinter
  onlyRealEdition(_editionNumber)
  returns (uint256) {
    // Under mint token, meaning it takes one from the already sold version
    uint256 _tokenId = _underMintNextTokenId(_editionNumber);

    // If the next tokenId generate is more than the available number, abort as we have reached maximum under mint
    if (_tokenId > _editionNumber.add(editionNumberToEditionDetails[_editionNumber].totalAvailable)) {
      revert("Reached max tokenId, cannot under mint anymore");
    }

    // Create the token
    _mintToken(_to, _tokenId, _editionNumber, editionNumberToEditionDetails[_editionNumber].tokenURI);

    // Create the token
    return _tokenId;
  }

burn keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
  function burn(uint256 _tokenId) public onlyIfKnownOrigin {

    // Clear from parents
    super._burn(ownerOf(_tokenId), _tokenId);

    // Get hold of the edition for cleanup
    uint256 _editionNumber = tokenIdToEditionNumber[_tokenId];

    // Delete token ID mapping
    delete tokenIdToEditionNumber[_tokenId];

    // Delete tokens associated to the edition - this will leave a gap in the array of zero
    uint256[] storage tokenIdsForEdition = editionNumberToTokenIds[_editionNumber];
    uint256 editionTokenIdIndex = editionNumberToTokenIdIndex[_tokenId];
    delete tokenIdsForEdition[editionTokenIdIndex];
  }

batchTransfer keyboard_arrow_up

Parameters help

Name Type
_to
address help
_tokenIds
uint256[] help

Properties

Visibility help public
Mutability help transaction
Source Code
  function batchTransfer(address _to, uint256[] _tokenIds) public {
    for (uint i = 0; i < _tokenIds.length; i++) {
      safeTransferFrom(ownerOf(_tokenIds[i]), _to, _tokenIds[i]);
    }
  }

batchTransferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_tokenIds
uint256[] help

Properties

Visibility help public
Mutability help transaction
Source Code
  function batchTransferFrom(address _from, address _to, uint256[] _tokenIds) public {
    for (uint i = 0; i < _tokenIds.length; i++) {
      transferFrom(_from, _to, _tokenIds[i]);
    }
  }

updateTokenBaseURI keyboard_arrow_up

Parameters help

Name Type
_newBaseURI
string help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
  function updateTokenBaseURI(string _newBaseURI)
  external
  onlyIfKnownOrigin {
    require(bytes(_newBaseURI).length != 0, "Base URI invalid");
    tokenBaseURI = _newBaseURI;
  }

updateKoCommissionAccount keyboard_arrow_up

Parameters help

Name Type
_koCommissionAccount
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
  function updateKoCommissionAccount(address _koCommissionAccount)
  external
  onlyIfKnownOrigin {
    require(_koCommissionAccount != address(0), "Invalid address");
    koCommissionAccount = _koCommissionAccount;
  }

updateEditionTokenURI keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_uri
string help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
  function updateEditionTokenURI(uint256 _editionNumber, string _uri)
  external
  onlyIfKnownOrigin
  onlyRealEdition(_editionNumber) {
    editionNumberToEditionDetails[_editionNumber].tokenURI = _uri;
  }

updatePriceInWei keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_priceInWei
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
  function updatePriceInWei(uint256 _editionNumber, uint256 _priceInWei)
  external
  onlyIfKnownOrigin
  onlyRealEdition(_editionNumber) {
    editionNumberToEditionDetails[_editionNumber].priceInWei = _priceInWei;
  }

updateArtistCommission keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_rate
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
  function updateArtistCommission(uint256 _editionNumber, uint256 _rate)
  external
  onlyIfKnownOrigin
  onlyRealEdition(_editionNumber) {
    editionNumberToEditionDetails[_editionNumber].artistCommission = _rate;
  }

updateArtistsAccount keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_artistAccount
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
  function updateArtistsAccount(uint256 _editionNumber, address _artistAccount)
  external
  onlyIfKnownOrigin
  onlyRealEdition(_editionNumber) {

    EditionDetails storage _originalEditionDetails = editionNumberToEditionDetails[_editionNumber];

    uint256 editionArtistIndex = editionNumberToArtistIndex[_editionNumber];

    // Get list of editions old artist works with
    uint256[] storage editionNumbersForArtist = artistToEditionNumbers[_originalEditionDetails.artistAccount];

    // Remove edition from artists lists
    delete editionNumbersForArtist[editionArtistIndex];

    // Add new artists to the list
    uint256 newArtistsEditionIndex = artistToEditionNumbers[_artistAccount].length;
    artistToEditionNumbers[_artistAccount].push(_editionNumber);
    editionNumberToArtistIndex[_editionNumber] = newArtistsEditionIndex;

    // Update the edition
    _originalEditionDetails.artistAccount = _artistAccount;
  }

updateEditionType keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_editionType
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
  function updateEditionType(uint256 _editionNumber, uint256 _editionType)
  external
  onlyIfKnownOrigin
  onlyRealEdition(_editionNumber) {

    EditionDetails storage _originalEditionDetails = editionNumberToEditionDetails[_editionNumber];

    // Get list of editions for old type
    uint256[] storage editionNumbersForType = editionTypeToEditionNumber[_originalEditionDetails.editionType];

    // Remove edition from old type list
    uint256 editionTypeIndex = editionNumberToTypeIndex[_editionNumber];
    delete editionNumbersForType[editionTypeIndex];

    // Add new type to the list
    uint256 newTypeEditionIndex = editionTypeToEditionNumber[_editionType].length;
    editionTypeToEditionNumber[_editionType].push(_editionNumber);
    editionNumberToTypeIndex[_editionNumber] = newTypeEditionIndex;

    // Update the edition
    _originalEditionDetails.editionType = _editionType;
  }

updateActive keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_active
bool help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
  function updateActive(uint256 _editionNumber, bool _active)
  external
  onlyIfKnownOrigin
  onlyRealEdition(_editionNumber) {
    editionNumberToEditionDetails[_editionNumber].active = _active;
  }

updateTotalSupply keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_totalSupply
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
  function updateTotalSupply(uint256 _editionNumber, uint256 _totalSupply)
  public
  onlyIfKnownOrigin
  onlyRealEdition(_editionNumber) {
    require(tokensOfEdition(_editionNumber).length <= _totalSupply, "Can not lower totalSupply to below the number of tokens already in existence");
    editionNumberToEditionDetails[_editionNumber].totalSupply = _totalSupply;
  }

updateTotalAvailable keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_totalAvailable
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
  function updateTotalAvailable(uint256 _editionNumber, uint256 _totalAvailable)
  external
  onlyIfKnownOrigin
  onlyRealEdition(_editionNumber) {
    EditionDetails storage _editionDetails = editionNumberToEditionDetails[_editionNumber];

    require(_editionDetails.totalSupply <= _totalAvailable, "Unable to reduce available amount to the below the number totalSupply");

    uint256 originalAvailability = _editionDetails.totalAvailable;
    _editionDetails.totalAvailable = _totalAvailable;
    totalNumberAvailable = totalNumberAvailable.sub(originalAvailability).add(_totalAvailable);
  }

updateStartDate keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_startDate
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
  function updateStartDate(uint256 _editionNumber, uint256 _startDate)
  external
  onlyIfKnownOrigin
  onlyRealEdition(_editionNumber) {
    editionNumberToEditionDetails[_editionNumber].startDate = _startDate;
  }

updateEndDate keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_endDate
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
  function updateEndDate(uint256 _editionNumber, uint256 _endDate)
  external
  onlyIfKnownOrigin
  onlyRealEdition(_editionNumber) {
    editionNumberToEditionDetails[_editionNumber].endDate = _endDate;
  }

updateOptionalCommission keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help
_rate
uint256 help
_recipient
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

UNKNOWN VALUE must be less than or equal to 100
Source Code
  function updateOptionalCommission(uint256 _editionNumber, uint256 _rate, address _recipient)
  external
  onlyIfKnownOrigin
  onlyRealEdition(_editionNumber) {
    EditionDetails storage _editionDetails = editionNumberToEditionDetails[_editionNumber];
    uint256 artistCommission = _editionDetails.artistCommission;

    if (_rate > 0) {
      require(_recipient != address(0), "Setting a rate must be accompanied by a valid address");
    }
    require(artistCommission.add(_rate) <= 100, "Cant set commission greater than 100%");

    editionNumberToOptionalCommissionSplit[_editionNumber] = CommissionSplit({rate : _rate, recipient : _recipient});
  }

setTokenURI keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help
_uri
string help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

null
Source Code
  function setTokenURI(uint256 _tokenId, string _uri)
  external
  onlyIfKnownOrigin
  onlyValidTokenId(_tokenId) {
    _setTokenURI(_tokenId, _uri);
  }

editionOfTokenId keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function editionOfTokenId(uint256 _tokenId) public view returns (uint256 _editionNumber) {
    return tokenIdToEditionNumber[_tokenId];
  }

editionsOfType keyboard_arrow_up

Parameters help

Name Type
_type
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function editionsOfType(uint256 _type) public view returns (uint256[] _editionNumbers) {
    return editionTypeToEditionNumber[_type];
  }

artistsEditions keyboard_arrow_up

Parameters help

Name Type
_artistsAccount
address help

Properties

Visibility help public
Mutability help view
Source Code
  function artistsEditions(address _artistsAccount) public view returns (uint256[] _editionNumbers) {
    return artistToEditionNumbers[_artistsAccount];
  }

tokensOfEdition keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function tokensOfEdition(uint256 _editionNumber) public view returns (uint256[] _tokenIds) {
    return editionNumberToTokenIds[_editionNumber];
  }

tokensOf keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

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

editionExists keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function editionExists(uint256 _editionNumber) public view returns (bool) {
    if (_editionNumber == 0) {
      return false;
    }
    EditionDetails storage editionNumber = editionNumberToEditionDetails[_editionNumber];
    return editionNumber.editionNumber == _editionNumber;
  }

editionOptionalCommission keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function editionOptionalCommission(uint256 _editionNumber) public view returns (uint256 _rate, address _recipient) {
    CommissionSplit storage commission = editionNumberToOptionalCommissionSplit[_editionNumber];
    return (commission.rate, commission.recipient);
  }

detailsOfEdition keyboard_arrow_up

Parameters help

Name Type
editionNumber
uint256 help

Properties

Visibility help public
Mutability help view

Modifiers help

Source Code
  function detailsOfEdition(uint256 editionNumber)
  public view
  onlyRealEdition(editionNumber)
  returns (
    bytes32 _editionData,
    uint256 _editionType,
    uint256 _startDate,
    uint256 _endDate,
    address _artistAccount,
    uint256 _artistCommission,
    uint256 _priceInWei,
    string _tokenURI,
    uint256 _totalSupply,
    uint256 _totalAvailable,
    bool _active
  ) {
    EditionDetails storage _editionDetails = editionNumberToEditionDetails[editionNumber];
    return (
    _editionDetails.editionData,
    _editionDetails.editionType,
    _editionDetails.startDate,
    _editionDetails.endDate,
    _editionDetails.artistAccount,
    _editionDetails.artistCommission,
    _editionDetails.priceInWei,
    Strings.strConcat(tokenBaseURI, _editionDetails.tokenURI),
    _editionDetails.totalSupply,
    _editionDetails.totalAvailable,
    _editionDetails.active
    );
  }

tokenData keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Modifiers help

onlyValidTokenId checks for the following:
null
Source Code
  function tokenData(uint256 _tokenId)
  public view
  onlyValidTokenId(_tokenId)
  returns (
    uint256 _editionNumber,
    uint256 _editionType,
    bytes32 _editionData,
    string _tokenURI,
    address _owner
  ) {
    uint256 editionNumber = tokenIdToEditionNumber[_tokenId];
    EditionDetails storage editionDetails = editionNumberToEditionDetails[editionNumber];
    return (
    editionNumber,
    editionDetails.editionType,
    editionDetails.editionData,
    tokenURI(_tokenId),
    ownerOf(_tokenId)
    );
  }

tokenURISafe keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function tokenURISafe(uint256 _tokenId) public view returns (string) {
    return Strings.strConcat(tokenBaseURI, tokenURIs[_tokenId]);
  }

purchaseDatesToken keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function purchaseDatesToken(uint256 _tokenId) public view returns (uint256 _startDate, uint256 _endDate) {
    uint256 _editionNumber = tokenIdToEditionNumber[_tokenId];
    return purchaseDatesEdition(_editionNumber);
  }

priceInWeiToken keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function priceInWeiToken(uint256 _tokenId) public view returns (uint256 _priceInWei) {
    uint256 _editionNumber = tokenIdToEditionNumber[_tokenId];
    return priceInWeiEdition(_editionNumber);
  }

editionData keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function editionData(uint256 _editionNumber) public view returns (bytes32) {
    EditionDetails storage _editionDetails = editionNumberToEditionDetails[_editionNumber];
    return _editionDetails.editionData;
  }

editionType keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function editionType(uint256 _editionNumber) public view returns (uint256) {
    EditionDetails storage _editionDetails = editionNumberToEditionDetails[_editionNumber];
    return _editionDetails.editionType;
  }

purchaseDatesEdition keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function purchaseDatesEdition(uint256 _editionNumber) public view returns (uint256 _startDate, uint256 _endDate) {
    EditionDetails storage _editionDetails = editionNumberToEditionDetails[_editionNumber];
    return (
    _editionDetails.startDate,
    _editionDetails.endDate
    );
  }

artistCommission keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function artistCommission(uint256 _editionNumber) public view returns (address _artistAccount, uint256 _artistCommission) {
    EditionDetails storage _editionDetails = editionNumberToEditionDetails[_editionNumber];
    return (
    _editionDetails.artistAccount,
    _editionDetails.artistCommission
    );
  }

priceInWeiEdition keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function priceInWeiEdition(uint256 _editionNumber) public view returns (uint256 _priceInWei) {
    EditionDetails storage _editionDetails = editionNumberToEditionDetails[_editionNumber];
    return _editionDetails.priceInWei;
  }

tokenURIEdition keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function tokenURIEdition(uint256 _editionNumber) public view returns (string) {
    EditionDetails storage _editionDetails = editionNumberToEditionDetails[_editionNumber];
    return Strings.strConcat(tokenBaseURI, _editionDetails.tokenURI);
  }

editionActive keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function editionActive(uint256 _editionNumber) public view returns (bool) {
    EditionDetails storage _editionDetails = editionNumberToEditionDetails[_editionNumber];
    return _editionDetails.active;
  }

totalRemaining keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function totalRemaining(uint256 _editionNumber) public view returns (uint256) {
    EditionDetails storage _editionDetails = editionNumberToEditionDetails[_editionNumber];
    return _editionDetails.totalAvailable.sub(_editionDetails.totalSupply);
  }

totalAvailableEdition keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function totalAvailableEdition(uint256 _editionNumber) public view returns (uint256) {
    EditionDetails storage _editionDetails = editionNumberToEditionDetails[_editionNumber];
    return _editionDetails.totalAvailable;
  }

totalSupplyEdition keyboard_arrow_up

Parameters help

Name Type
_editionNumber
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
  function totalSupplyEdition(uint256 _editionNumber) public view returns (uint256) {
    EditionDetails storage _editionDetails = editionNumberToEditionDetails[_editionNumber];
    return _editionDetails.totalSupply;
  }