Created
February 24, 2024 17:55
-
-
Save Mexidense/d58a31c848272d019434bbefd901c6ba to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.24+commit.e11b9ed9.js&optimize=false&runs=200&gist=
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.20; | |
// Owner = 0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C | |
// Receiver = 0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB | |
// Operator = 0x583031D1113aD414F02576BD6afaBfb302140225 | |
import "@openzeppelin/[email protected]/token/ERC1155/ERC1155.sol"; | |
contract CustomERC1155 is ERC1155 { | |
uint256 public constant GOLD = 0; | |
uint256 public constant SILVER = 1; | |
uint256 public constant THORS_HAMMER = 2; | |
uint256 public constant SWORD = 3; | |
uint256 public constant SHIELD = 4; | |
constructor() ERC1155("https://game.example/api/item/{id}.json") { | |
_mint(msg.sender, GOLD, 10**18, ""); | |
_mint(msg.sender, SILVER, 10**27, ""); | |
_mint(msg.sender, THORS_HAMMER, 1, ""); | |
_mint(msg.sender, SWORD, 10**9, ""); | |
_mint(msg.sender, SHIELD, 10**18, ""); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment