-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rename LSP8CompatibilityForERC721 to LSP8CompatibleERC721 + add…
… mintable preset contracts (#218) * chore: change references in Hardhat config file * chore: change references in Mythx file * test: change contract names to CompatibleERC721 * feat: add LSP8CompatibleERC721 Mintable contracts * chore: change name of compatible contracts to CompatibleERC721 * Update contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol Co-authored-by: Jean Cvllr <31145285+CJ42@users.noreply.github.com> * chore: add LSP8CompatibleERC721Mintable contracts to hardhat congfig * chore: fix typos in contract name Co-authored-by: Jean Cvllr <31145285+CJ42@users.noreply.github.com>
- Loading branch information
1 parent
fc7b0df
commit 53e33cc
Showing
15 changed files
with
216 additions
and
161 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
File renamed without changes.
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
22 changes: 22 additions & 0 deletions
22
contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.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,22 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {LSP8CompatibleERC721} from "../extensions/LSP8CompatibleERC721.sol"; | ||
|
||
contract LSP8CompatibleERC721Mintable is LSP8CompatibleERC721 { | ||
/* solhint-disable no-empty-blocks */ | ||
constructor( | ||
string memory name_, | ||
string memory symbol_, | ||
address newOwner_ | ||
) LSP8CompatibleERC721(name_, symbol_, newOwner_) {} | ||
|
||
function mint( | ||
address to, | ||
bytes32 tokenId, | ||
bool force, | ||
bytes memory data | ||
) public onlyOwner { | ||
_mint(to, tokenId, force, data); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.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,21 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
// modules | ||
import {LSP8CompatibleERC721MintableInitAbstract} from "./LSP8CompatibleERC721MintableInitAbstract.sol"; | ||
|
||
contract LSP8CompatibleERC721MintableInit is LSP8CompatibleERC721MintableInitAbstract { | ||
/** | ||
* @notice Sets the name, the symbol and the owner of the token | ||
* @param name_ The name of the token | ||
* @param symbol_ The symbol of the token | ||
* @param newOwner_ The owner of the token | ||
*/ | ||
function initialize( | ||
string memory name_, | ||
string memory symbol_, | ||
address newOwner_ | ||
) public virtual initializer { | ||
LSP8CompatibleERC721MintableInitAbstract._initialize(name_, symbol_, newOwner_); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.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,27 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
// modules | ||
import {LSP8CompatibleERC721InitAbstract} from "../extensions/LSP8CompatibleERC721InitAbstract.sol"; | ||
|
||
contract LSP8CompatibleERC721MintableInitAbstract is LSP8CompatibleERC721InitAbstract { | ||
/** | ||
* @inheritdoc LSP8CompatibleERC721InitAbstract | ||
*/ | ||
function _initialize( | ||
string memory name_, | ||
string memory symbol_, | ||
address newOwner_ | ||
) internal virtual override onlyInitializing { | ||
LSP8CompatibleERC721InitAbstract._initialize(name_, symbol_, newOwner_); | ||
} | ||
|
||
function mint( | ||
address to, | ||
bytes32 tokenId, | ||
bool force, | ||
bytes memory data | ||
) public onlyOwner { | ||
_mint(to, tokenId, force, data); | ||
} | ||
} |
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
Oops, something went wrong.