-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #447 from ArtBlocks/refactor-v3-core-interfaces
Use common V3 core base interface
- Loading branch information
Showing
6 changed files
with
142 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127 changes: 127 additions & 0 deletions
127
contracts/interfaces/0.8.x/IGenArt721CoreContractV3_Base.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
// SPDX-License-Identifier: LGPL-3.0-only | ||
// Created By: Art Blocks Inc. | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import "./IAdminACLV0.sol"; | ||
/// use the Royalty Registry's IManifold interface for token royalties | ||
import "./IManifold.sol"; | ||
|
||
/** | ||
* @title This interface is intended to house interface items that are common | ||
* across all GenArt721CoreContractV3 flagship and derivative implementations. | ||
* This interface extends the IManifold royalty interface in order to | ||
* add support the Royalty Registry by default. | ||
* @author Art Blocks Inc. | ||
*/ | ||
interface IGenArt721CoreContractV3_Base is IManifold { | ||
/** | ||
* @notice Token ID `_tokenId` minted to `_to`. | ||
*/ | ||
event Mint(address indexed _to, uint256 indexed _tokenId); | ||
|
||
/** | ||
* @notice currentMinter updated to `_currentMinter`. | ||
* @dev Implemented starting with V3 core | ||
*/ | ||
event MinterUpdated(address indexed _currentMinter); | ||
|
||
/** | ||
* @notice Platform updated on bytes32-encoded field `_field`. | ||
*/ | ||
event PlatformUpdated(bytes32 indexed _field); | ||
|
||
/** | ||
* @notice Project ID `_projectId` updated on bytes32-encoded field | ||
* `_update`. | ||
*/ | ||
event ProjectUpdated(uint256 indexed _projectId, bytes32 indexed _update); | ||
|
||
event ProposedArtistAddressesAndSplits( | ||
uint256 indexed _projectId, | ||
address _artistAddress, | ||
address _additionalPayeePrimarySales, | ||
uint256 _additionalPayeePrimarySalesPercentage, | ||
address _additionalPayeeSecondarySales, | ||
uint256 _additionalPayeeSecondarySalesPercentage | ||
); | ||
|
||
event AcceptedArtistAddressesAndSplits(uint256 indexed _projectId); | ||
|
||
// version and type of the core contract | ||
// coreVersion is a string of the form "0.x.y" | ||
function coreVersion() external view returns (string memory); | ||
|
||
// coreType is a string of the form "GenArt721CoreV3" | ||
function coreType() external view returns (string memory); | ||
|
||
// owner (pre-V3 was named admin) of contract | ||
// this is expected to be an Admin ACL contract for V3 | ||
function owner() external view returns (address); | ||
|
||
// Admin ACL contract for V3, will be at the address owner() | ||
function adminACLContract() external returns (IAdminACLV0); | ||
|
||
// backwards-compatible (pre-V3) admin - equal to owner() | ||
function admin() external view returns (address); | ||
|
||
/** | ||
* Function determining if _sender is allowed to call function with | ||
* selector _selector on contract `_contract`. Intended to be used with | ||
* peripheral contracts such as minters, as well as internally by the | ||
* core contract itself. | ||
*/ | ||
function adminACLAllowed( | ||
address _sender, | ||
address _contract, | ||
bytes4 _selector | ||
) external returns (bool); | ||
|
||
// getter function of public variable | ||
function nextProjectId() external view returns (uint256); | ||
|
||
// getter function of public mapping | ||
function tokenIdToProjectId( | ||
uint256 tokenId | ||
) external view returns (uint256 projectId); | ||
|
||
// @dev this is not available in V0 | ||
function isMintWhitelisted(address minter) external view returns (bool); | ||
|
||
function projectIdToArtistAddress( | ||
uint256 _projectId | ||
) external view returns (address payable); | ||
|
||
function projectIdToAdditionalPayeePrimarySales( | ||
uint256 _projectId | ||
) external view returns (address payable); | ||
|
||
function projectIdToAdditionalPayeePrimarySalesPercentage( | ||
uint256 _projectId | ||
) external view returns (uint256); | ||
|
||
// @dev new function in V3 | ||
function projectStateData( | ||
uint256 _projectId | ||
) | ||
external | ||
view | ||
returns ( | ||
uint256 invocations, | ||
uint256 maxInvocations, | ||
bool active, | ||
bool paused, | ||
uint256 completedTimestamp, | ||
bool locked | ||
); | ||
|
||
// function to set a token's hash (must be guarded) | ||
function setTokenHash_8PT(uint256 _tokenId, bytes32 _hash) external; | ||
|
||
// @dev gas-optimized signature in V3 for `mint` | ||
function mint_Ecf( | ||
address _to, | ||
uint256 _projectId, | ||
address _by | ||
) external returns (uint256 tokenId); | ||
} |
Oops, something went wrong.