-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
521f0bc
commit 28f515a
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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: MIT | ||
// Compatible with OpenZeppelin Contracts ^5.0.0 | ||
pragma solidity 0.8.25; | ||
|
||
import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; | ||
import {ERC1155URIStorage} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol"; | ||
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; | ||
|
||
contract ParedesNFT is ERC1155, ERC1155URIStorage, Ownable { | ||
constructor(address initialOwner) ERC1155("") Ownable(initialOwner) {} | ||
|
||
function setURI(uint256 id_, string memory uri_) public onlyOwner { | ||
_setURI(id_, uri_); | ||
} | ||
|
||
function mint(address account, uint256 id, uint256 amount, bytes memory data) | ||
public | ||
onlyOwner | ||
{ | ||
_mint(account, id, amount, data); | ||
} | ||
|
||
function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) | ||
public | ||
onlyOwner | ||
{ | ||
_mintBatch(to, ids, amounts, data); | ||
} | ||
|
||
function uri(uint256 tokenId) public view override(ERC1155, ERC1155URIStorage) returns (string memory) { | ||
return ERC1155URIStorage.uri(tokenId); | ||
} | ||
} |
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,14 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.13; | ||
|
||
import {Test, console} from "forge-std/Test.sol"; | ||
import {ParedesNFT} from "../src/ParedesNFT.sol"; | ||
|
||
contract ParedesNFTTest is Test { | ||
ParedesNFT public paredes; | ||
|
||
function setUp() public { | ||
paredes = new ParedesNFT(msg.sender); | ||
} | ||
|
||
} |