-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* separated out metadata functionality from mintable module * built in signature mint into the core erc721 contract * implemented in Mintable * Implemented updateMetadata * simplified parameters and structs * all tests pass * updated ERC721 initializable to match ERC721Core * addressed the PR issues * updated 1155 versions to now match 721 implementations * completed all the tests * Implemented parity in the ERC1155Initializable contract * unified naming from quantity and value to amount * slapped on a keccak256 * move OwnableRoles check on the signature * removed double events being emitted * tests pass * updated ERC20 core * implemented Claimable and Mintable on the ERC20 side * tests pass * updated based on PR feedback
- Loading branch information
Showing
36 changed files
with
1,621 additions
and
2,065 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.20; | ||
|
||
contract BeforeMintWithSignatureCallbackERC1155 { | ||
|
||
/*////////////////////////////////////////////////////////////// | ||
ERRORS | ||
//////////////////////////////////////////////////////////////*/ | ||
|
||
error BeforeMintWithSignatureCallbackERC1155NotImplemented(); | ||
|
||
/*////////////////////////////////////////////////////////////// | ||
EXTERNAL FUNCTIONS | ||
//////////////////////////////////////////////////////////////*/ | ||
|
||
/** | ||
* @notice The beforeMintWithSignatureERC1155 hook that is called by a core token before minting tokens. | ||
* | ||
* @param _to The address that is minting tokens. | ||
* @param _amount The quantity of tokens to mint. | ||
* @param _data Optional extra data passed to the hook. | ||
* @param _signer The address that signed the minting request. | ||
* @return result Abi encoded bytes result of the hook. | ||
*/ | ||
function beforeMintWithSignatureERC1155( | ||
address _to, | ||
uint256 _id, | ||
uint256 _amount, | ||
bytes memory _data, | ||
address _signer | ||
) external payable virtual returns (bytes memory result) { | ||
revert BeforeMintWithSignatureCallbackERC1155NotImplemented(); | ||
} | ||
|
||
} |
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,34 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.20; | ||
|
||
contract BeforeMintWithSignatureCallbackERC20 { | ||
|
||
/*////////////////////////////////////////////////////////////// | ||
ERRORS | ||
//////////////////////////////////////////////////////////////*/ | ||
|
||
error BeforeMintWithSignatureCallbackERC20NotImplemented(); | ||
|
||
/*////////////////////////////////////////////////////////////// | ||
EXTERNAL FUNCTIONS | ||
//////////////////////////////////////////////////////////////*/ | ||
|
||
/** | ||
* @notice The beforeMintWithSignatureERC20 hook that is called by a core token before minting tokens. | ||
* | ||
* @param _to The address that is minting tokens. | ||
* @param _amount The amount of tokens to mint. | ||
* @param _data Optional extra data passed to the hook. | ||
* @param _signer The address that signed the minting request. | ||
* @return result Abi encoded bytes result of the hook. | ||
*/ | ||
function beforeMintWithSignatureERC20(address _to, uint256 _amount, bytes memory _data, address _signer) | ||
external | ||
payable | ||
virtual | ||
returns (bytes memory result) | ||
{ | ||
revert BeforeMintWithSignatureCallbackERC20NotImplemented(); | ||
} | ||
|
||
} |
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,35 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.20; | ||
|
||
contract BeforeMintWithSignatureCallbackERC721 { | ||
|
||
/*////////////////////////////////////////////////////////////// | ||
ERRORS | ||
//////////////////////////////////////////////////////////////*/ | ||
|
||
error BeforeMintWithSignatureCallbackERC721NotImplemented(); | ||
|
||
/*////////////////////////////////////////////////////////////// | ||
EXTERNAL FUNCTIONS | ||
//////////////////////////////////////////////////////////////*/ | ||
|
||
/** | ||
* @notice The beforeMintWithSignatureERC721 hook that is called by a core token before minting tokens. | ||
* | ||
* @param _to The address that is minting tokens. | ||
* @param _amount The amount of tokens to mint. | ||
* @param _data Optional extra data passed to the hook. | ||
* @param _signer The address that signed the minting request. | ||
* @return result Abi encoded bytes result of the hook. | ||
*/ | ||
function beforeMintWithSignatureERC721( | ||
address _to, | ||
uint256 _startTokenId, | ||
uint256 _amount, | ||
bytes memory _data, | ||
address _signer | ||
) external payable virtual returns (bytes memory result) { | ||
revert BeforeMintWithSignatureCallbackERC721NotImplemented(); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.20; | ||
|
||
contract UpdateMetadataCallbackERC1155 { | ||
|
||
/*////////////////////////////////////////////////////////////// | ||
ERRORS | ||
//////////////////////////////////////////////////////////////*/ | ||
|
||
error UpdateMetadataCallbackERC1155NotImplemented(); | ||
|
||
/*////////////////////////////////////////////////////////////// | ||
EXTERNAL FUNCTIONS | ||
//////////////////////////////////////////////////////////////*/ | ||
|
||
/** | ||
* @notice The beforeMintERC1155 hook that is called by a core token before minting tokens. | ||
* | ||
* @param _to The address that is minting tokens. | ||
* @param _quantity The quantity of tokens to mint. | ||
* @param _baseURI The URI to fetch token metadata from. | ||
* @return result Abi encoded bytes result of the hook. | ||
*/ | ||
function updateMetadataERC1155(address _to, uint256 _startTokenId, uint256 _quantity, string calldata _baseURI) | ||
external | ||
payable | ||
virtual | ||
returns (bytes memory result) | ||
{ | ||
revert UpdateMetadataCallbackERC1155NotImplemented(); | ||
} | ||
|
||
} |
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,33 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.20; | ||
|
||
contract UpdateMetadataCallbackERC721 { | ||
|
||
/*////////////////////////////////////////////////////////////// | ||
ERRORS | ||
//////////////////////////////////////////////////////////////*/ | ||
|
||
error UpdateMetadataCallbackERC721NotImplemented(); | ||
|
||
/*////////////////////////////////////////////////////////////// | ||
EXTERNAL FUNCTIONS | ||
//////////////////////////////////////////////////////////////*/ | ||
|
||
/** | ||
* @notice The beforeMintERC721 hook that is called by a core token before minting tokens. | ||
* | ||
* @param _to The address that is minting tokens. | ||
* @param _amount The amount of tokens to mint. | ||
* @param _baseURI The URI to fetch token metadata from. | ||
* @return result Abi encoded bytes result of the hook. | ||
*/ | ||
function updateMetadataERC721(address _to, uint256 _startTokenId, uint256 _amount, string calldata _baseURI) | ||
external | ||
payable | ||
virtual | ||
returns (bytes memory result) | ||
{ | ||
revert UpdateMetadataCallbackERC721NotImplemented(); | ||
} | ||
|
||
} |
Oops, something went wrong.