Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Contracts/Basic1155.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ contract Basic is ERC1155, Ownable {
constructor(string memory uri) ERC1155(uri) {}

// Mint tokens to an address (only callable by the owner or forging contract)
function mint(address to, uint256 id, uint256 amount, bytes memory data) external onlyOwner {
_mint(to, id, amount, data);
}


// Burn tokens from an address (only callable by the owner or forging contract)
function burn(address from, uint256 id, uint256 amount) external onlyOwner {
_burn(from, id, amount);
Expand Down
23 changes: 23 additions & 0 deletions Profile.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Profile</title>
<link rel="stylesheet" href="styles.css">
<script defer src="profile.js"></script>
</head>
<body>

<h2>Welcome, <span id="profileUser">Guest</span></h2>

<!-- Update Username -->
<input type="text" id="newUsername" placeholder="Enter New Username">
<button onclick="saveNewUsername()">Save Changes</button>

<!-- Back to Home -->
<br><br>
<a href="index.html">Back to Home</a>

</body>
</html>
20 changes: 20 additions & 0 deletions basicERC1155.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract Basic is ERC1155, Ownable {
constructor(string memory uri) ERC1155(uri) {}

// Mint tokens to an address (only callable by the owner or forging contract)
function mint(address to, uint256 id, uint256 amount, bytes memory data) external onlyOwner {
_mint(to, id, amount, data);
}

// Burn tokens from an address (only callable by the owner or forging contract)

function burn(address from, uint256 id, uint256 amount) external onlyOwner {
_burn(from, id, amount);
}
}