fix nftFactory && test ing

This commit is contained in:
owen05
2021-04-09 00:27:53 +08:00
parent 2e1b0e0e9b
commit 7f3932d8f3
11 changed files with 135 additions and 77 deletions

View File

@@ -24,13 +24,13 @@ contract InitializableERC1155 is IERC165, IERC1155, IERC1155MetadataURI {
string private _uri;
function init(
address creator,
uint256 amount,
string memory baseUrI
) public {
_setURI(baseUrI);
_mint(msg.sender, 0, amount ,"");
_mint(creator, 0, amount ,"");
}
function supportsInterface(bytes4 interfaceId) public view override returns (bool) {

View File

@@ -43,6 +43,7 @@ contract InitializableERC721 is IERC165, IERC721, IERC721Metadata {
function init(
address creator,
string memory name,
string memory symbol,
string memory baseUrI
@@ -50,7 +51,7 @@ contract InitializableERC721 is IERC165, IERC721, IERC721Metadata {
_name = name;
_symbol = symbol;
_baseURI = baseUrI;
_safeMint(msg.sender, 0);
_mint(creator, 0);
}