Skip to content

Commit

Permalink
chore: initial tests ok
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffprestes committed Dec 3, 2024
1 parent 521f0bc commit 28f515a
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions cache/solidity-files-cache.json

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions src/ParedesNFT.sol
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);
}
}
14 changes: 14 additions & 0 deletions test/ParedesNFT.t.sol
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);
}

}

0 comments on commit 28f515a

Please sign in to comment.