• Stars
    star
    168
  • Rank 225,507 (Top 5 %)
  • Language
    Solidity
  • License
    MIT License
  • Created about 6 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ”ฎ Very Simple ERC-721 Smart Contract Template to create your own ERC-721 Tokens on the Ethereum Blockchain, with many customizable options ๐Ÿ”ฎ

๐Ÿ”ฎ Simple Game ERC-721 Token Template ๐Ÿ”ฎ

๐Ÿ”ฎ Very Simple ERC-721 Smart Contract Template to create your own ERC-721 Tokens on the Ethereum Blockchain, with many customizable Options ๐Ÿ”ฎ

๐Ÿ’Ž What is ERC-721? ๐Ÿ’Ž

ERC-721 is a free, open standard that describes how to build non-fungible or unique tokens on the Ethereum blockchain. While most tokens are fungible (every token is the same as every other token), ERC-721 Tokens are all unique.

One of the most known examples for an ERC-721 Token is Crypto Kitties (https://www.cryptokitties.co/), where each Cat is an unique ERC-721 Token. ๐Ÿ˜บ

โš™๏ธ Setup โš™๏ธ

Each Line of the Solidity Code has a comment that explains what is happening. ๐Ÿ“

The Setup is fairly easy, you just need to click on the Remix link or use the Gist link and you're done.
If you have problems with it, you can also do it the good old way and add each file separately. (Takes about 1 minute)

Remix IDE Link: https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=false&gist=6dfc6f9a27c0e6220094943657e3d834

GitHub Gist Link: https://gist.github.com/AYIDouble/6dfc6f9a27c0e6220094943657e3d834

๐Ÿ“ Remix - Solidity IDE ๐Ÿ“

Remix Solidity IDE Ethereum erc 721 erc721 erc-721 item game blockchain

Explanation of the Code:

At Line 5โ€“9: In the struct the Item with all his properties is defined (name, level, rarityLevel).

At Line 11: An Array is created, where all the Items of the contract owner are stored.

At Line 14โ€“16: We define that the owner is the user of the contract.

At Line 18: We define a function createItem, where the name (_name) of the Item is a parameter and the Ethereum address (_to) where we want to send our Items.

At Line 19: We define that only the owner of the contract is able to create Items.

At Line 20: Each time we create an Item the current Length of the Item array is being used as the ID for the Item. (Each Item has a unique ID)

At Line 21: The Item gets created and added to our Items array

At Line 22: The _mint function from the ERC721 Libraries is used for sending our Items to the specific ethereum address. As an example, this is needed to send the created Item to your ethereum address or any other address.

โš”๏ธ Item.sol โš”๏ธ (ERC-721 Token)

In this small example we are creating an ERC-721 Token, that could be used as an in-game Item. โš”๏ธ

Example: a Sword as a Item saved in the Ethereum Blockchain.

pragma solidity ^0.4.24;

contract Item is ERC721{
    
    struct Item{
        string name; // Name of the Item
        uint level; // Item Level
        uint rarityLevel;  // 1 = normal, 2 = rare, 3 = epic, 4 = legendary
    }
    
    Item[] public items; // First Item has Index 0
    address public owner;
    
    function Item() public {
        owner = msg.sender; // The Sender is the Owner; Ethereum Address of the Owner
    }
    
    function createItem(string _name, address _to) public{
        require(owner == msg.sender); // Only the Owner can create Items
        uint id = items.length; // Item ID = Length of the Array Items
        items.push(Item(_name,5,1)) // Item ("Sword",5,1)
        _mint(_to,id); // Assigns the Token to the Ethereum Address that is specified
    }
    
}

More Repositories

1

HTML-Crypto-Currency-Chart-Snippets

๐Ÿ’น Simple HTML Snippets to create Tickers / Charts of Cryptocurrencies with the TradingView API ๐Ÿ’น
HTML
263
star
2

Customizable-Crypto-Currency-Dashboard-with-Chart

๐Ÿ“บ A Dashboard with the price movements of the selected Cryptocurrencies ๐Ÿ’น
HTML
209
star
3

x86-Assembly-Reverse-Engineering

๐Ÿ›  Knowledge about the topic of x86 assembly & disassembly ๐Ÿ› 
Assembly
130
star
4

Market-Overview-Indexes-Forex-Metals-Crypto

๐Ÿ“บ A Market Overview with the Federal Funds Rate and the price movements of Market Indexes, Forex, Metals and Crypto ๐Ÿ’น
HTML
106
star
5

NASM-Assembly-Linux-Notes

๐Ÿง Assembly with Linux (Notes, Syscalls, Protection Rings) ๐Ÿง
Assembly
94
star
6

Binary-Calculator-JavaScript

๐Ÿ“ฑ A handy Calculator for Binary operations, that works on all Devices ๐Ÿ“ฑ ๐Ÿ’ป ๐Ÿ–ฅ | โ›“ https://play.google.com/store/apps/details?id=com.binarycalculator.ayidouble.binarycalculator.app โ›“
JavaScript
90
star
7

Simple-DLL-Injection

๐Ÿ”ง Simple DLL Injection into a Process with C++ ๐Ÿ”ง
C++
86
star
8

ChatGPT-Simple-Tutorial-Image-Text-Code-Generation

๐Ÿ–ผ๏ธ A simple ChatGPT AI tutorial on how to generate images/text/code and its limitations ๐Ÿค–
Python
85
star
9

IPA-2018-Informatiker-EFZ-Applikationsentwicklung-Alpay-Yildirim

๐Ÿ“• Meine individuelle praktische Arbeit (IPA) / Informatiker EFZ Applikationsentwicklung / Note: 5.4 ( Dokumentation, Zeitplan, Prรคsentation ) ๐Ÿ“˜๐Ÿ“—๐Ÿ“™
C#
67
star
10

Gold-Silver-Ratio-Metal-Chart

๐ŸŒ• Gold/Silver ratio metal charts with the USD/CHF price movements of Gold/Silver ๐ŸŒ‘
HTML
52
star
11

Forex-USD-Currency-Market-Chart

๐Ÿ’น Forex charts with the USD price movements of the selected currencies ๐Ÿ’น
HTML
52
star
12

Kernel-Memory-Reading-Writing

๐Ÿ” Code to read / write the Process Memory from the Kernel ๐Ÿ”ง
C
51
star
13

Simple-Cryptocurrency-ERC-20-Token-Template

๐Ÿ“ Very Simple ERC-20 Smart Contract Template to create your own Cryptocurrency on the Ethereum Blockchain, with many customizable Options ๐Ÿ“
Solidity
47
star
14

Simple-Memory-Reading-Writing

๐Ÿ” Very Simple Template to read / write Process Memory with C++ ๐Ÿ”ง
C++
42
star
15

IOTA-Arbitrage

๐Ÿ”ท IOTA Arbitrage ๐Ÿ”ท (Live ticker IOTA / Ethereum / Bitcoin) | โ›“ https://idouble.github.io/IOTA-Arbitrage โ›“
JavaScript
40
star
16

IDouble

38
star
17

Deep-Learning-Machine-Learning-AI-TensorFlow-Python

๐Ÿ A Collection of Notes for Learning & Understanding Deep Learning / Machine Learning / Artificial Intelligence (AI) with TensorFlow ๐Ÿ
Python
36
star
18

Pandas-Python-Data-Analysis-Playground

๐Ÿ Data Analysis with the Pandas Library & Notes ๐Ÿ“Š๐Ÿ“ˆ
Python
36
star
19

Python-Scripts

๐Ÿ Collection of useful Python Code Snippets ๐Ÿ
Python
35
star
20

BMI-Calculator-JavaScript

๐Ÿ“ฑ A handy Calculator to calculate your BMI (Body Mass Index), that works on all Devices ๐Ÿ“ฑ | โ›“ https://play.google.com/store/apps/details?id=com.bmicalculator.ayidouble.bmicalculator.app โ›“
JavaScript
35
star
21

Cat-Face-Detector-with-OpenCV-and-JavaFX

๐Ÿ“น A Small OpenCV (Open Source Computer Vision) Example, who has the ability to detect multiple cat faces at the same time ๐Ÿฑ
Java
34
star
22

Simple-ERC-1155-Multi-Token-Template

๐ŸŒŽ Very Simple ERC-1155 Smart Contract Template to create your own ERC-1155 Tokens on the Ethereum Blockchain, with many customizable options ๐ŸŒ
Solidity
34
star
23

Decentralized-World-Wide-Web-ERC-721

๐Ÿ’Ž A decentralized World Wide Web on the Ethereum Blockchain ๐ŸŒ (Still in the Proof of Concept stage)
Solidity
33
star
24

Swiss-Leader-Index-SLI-Chart

๐Ÿ‡จ๐Ÿ‡ญ Swiss Leader Index SLI charts with the CHF/USD price movements of the top stocks ๐Ÿ’น
HTML
32
star
25

Simple-Disassembly-Notes

โš™๏ธ Simple Step to Step Tutorials for Disassembling / Code Injection & getting Pointer Addresses ๐Ÿ”ง
Assembly
30
star
26

Binary-Calculator-Android-Java-App

๐Ÿ“ฑ A handy Calculator for Binary operations ๐Ÿ“ฑ | โ›“ https://play.google.com/store/apps/details?id=com.binarycalculator.ayidouble.binarycalculator.app โ›“
Java
30
star
27

Trinary-Calculator-JavaScript

๐Ÿ“ฑ A handy Calculator for Trinary operations, that works on all Devices ๐Ÿ“ฑ ๐Ÿ’ป ๐Ÿ–ฅ | โ›“ https://play.google.com/store/apps/details?id=com.trinarycalculator.ayidouble.trinarycalculator.app โ›“
JavaScript
30
star
28

Ethereum-Solidity-inline-Assembly

๐ŸŒ A Collection of Notes & Knowledge about Solidity inline Assembly ๐Ÿ”ง
Solidity
28
star
29

BMI-Calculator-Android-Java-App

๐Ÿ“ฑ A handy Calculator to calculate your BMI (Body Mass Index) ๐Ÿ“ฑ | โ›“ https://play.google.com/store/apps/details?id=com.bmicalculator.ayidouble.bmicalculator.app โ›“
Java
27
star
30

Multithreading-Chat-Client-Java

๐Ÿ‘ฅ A simple Chat Client in Java, implemented with the Observer pattern ๐Ÿ‘ฅ
Java
26
star
31

Blazor-Razor-Playground-C-Sharp

๐Ÿ“ Blazor Razor Playground in C# ๐Ÿ—ƒ
HTML
26
star
32

JSON-XML-REST-SOAP-Playground

๐Ÿ—„ JSON / XML, Serializing and Deserializing Playground (REST / SOAP) ๐Ÿ—ƒ
C#
24
star
33

IoT-Arduino-Game-Controller-Java

๐ŸŽฎ A Game controller realized with an Arduino, I modified the Arduino bootloader to program with Java โ˜•๏ธ
Java
21
star
34

Trinary-Calculator-Android-Java-App

๐Ÿ“ฑ A handy Calculator for Trinary operations ๐Ÿ“ฑ | โ›“ https://play.google.com/store/apps/details?id=com.trinarycalculator.ayidouble.trinarycalculator.app โ›“
Java
20
star
35

Simple-Blockchain-C-Sharp

๐Ÿ“˜ This is a C# port from Python code ๐Ÿ It uses SHA-256 as hash โ›“
C#
19
star
36

Multithreading-Chat-Server-Java

๐Ÿ–ฅ A simple Chat Server in Java, implemented with the Observer pattern ๐Ÿ–ฅ
Java
19
star
37

Simple-Vyper-ERC-20-Token-Template

๐Ÿ Very Simple ERC-20 Smart Contract Template written in Vyper to create your own Cryptocurrency on the Ethereum Blockchain, with many customizable Options ๐Ÿ“
Python
17
star
38

Brainfuck-Interpreter-Node.js

๐Ÿ›  This is a Brainfuck interpreter written in JavaScript ๐Ÿ–ฅ
JavaScript
15
star
39

Keyboard

โ˜•๏ธ A simple Java Library to send commands to the Keyboard โš™๏ธโŒจ๏ธ
Java
15
star
40

Mouse

โ˜•๏ธ A simple Java Library to build gamepads with ๐Ÿ–ฑ๐Ÿ•น
Java
14
star
41

PaperJS-Playground

๐Ÿ›  Learning paper.js & doing Experiments with it ๐Ÿ› 
HTML
14
star
42

Brainfuck-Code-Samples

๐Ÿ—„ Some Brainfuck Code Samples for my Brainfuck Interpreter โš™๏ธ
Brainfuck
14
star