Request for ERC721 token

First of all, I have to say it’s a great work for you geeks building this huge project for ethereum ecosystem.

Now here is my questions,I have create a new ERC20Token on remix with an exist smart contract code downloaded from anwhere else.
But ,I could not find the one for ERC721 token deploy.(I mean the full code in one file without importing any *.sol files)

So,does it mean:
1.Do I have to install openzeppelin on my computer?
2.Could it be installed on win10 system?
3.Is there a step to step guideline (more details)to deploy ERC721 token?
4.Advantage course of setting more specifics for the ERC721 token……

Thanks for all your kindly replies!
Happy ThanksGiving day!

2 Likes

This is a good question for a newbie without coding skills.
yes,you can make a simple erc20 token with just one sol file on remix .
but it’s more complex to erc721 contract.
so you should learn more,anyway,it could be easier in the future IMO.
GOOD LUCK!

2 Likes

Hi @kate_king,

Welcome to the community :wave:

You can Deploy a simple ERC20 token in Remix. This token uses OpenZeppelin Contracts.

You can deploy the following SimpleERC721 using Remix, you can then call mintWithTokenURI to mint tokens.

Note: You should only use code published in an official release of OpenZeppelin Contracts, the latest release is 2.4. When importing via GitHub on Remix you can specify the release tag, (otherwise you will get the latest code in the master branch). The example below imports v2.4.0.

SimpleERC721

pragma solidity ^0.5.5;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.4.0/contracts/token/ERC721/ERC721Full.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.4.0/contracts/token/ERC721/ERC721MetadataMintable.sol";

contract SimpleERC721 is ERC721Full, ERC721MetadataMintable {
    constructor() ERC721Full("Token", "TKN") public {
    }
}

You can deploy an ERC721 token from Remix importing OpenZeppelin from GitHub.
Though for a production project, you need appropriate testing, so would likely want to use OpenZeppelin SDK or Truffle.

See OpenZeppelin Contracts getting started: https://docs.openzeppelin.com/contracts/2.x/

You can install OpenZeppelin Contracts on Windows 10, though I prefer to use Windows Subsystem for Linux.

There isn't, but I am happy to help with information that you need.

I am not sure I understand what you mean. Are you talking about the metadata for an ERC721 token or something else?

1 Like

Big thanks for your reply,i think it will be helpful to someone like me.

1 Like

Thank for your kindly answer,I will do my best…

1 Like

For now I am a newbie,first step for me is to create a simple contract,so,how could I import all necessary files by a simple way,if I just create a simple erc721token contract with remix?

1 Like

Hi @kate_king,

For getting started with a testnet (not production), you can just compile and deploy the following ERC721 in Remix:

Remix will handle the importing from GitHub.

pragma solidity ^0.5.5;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.4.0/contracts/token/ERC721/ERC721Full.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.4.0/contracts/token/ERC721/ERC721MetadataMintable.sol";

contract SimpleERC721 is ERC721Full, ERC721MetadataMintable {
    constructor() ERC721Full("Token", "TKN") public {
    }
}

awesome,I have done it .
still,First I met a red error about compiler .
a bit issue confused me:the right compiler should be 0.5.5 ,but not the 0.5.0 mentioned in the code.

1 Like

A post was split to a new topic: Etherscan issue

Hi @kate_king,

Sorry about the pragma solidity ^0.5.0;, I was using the default compiler so didn’t have any issues. I have changed the code above to be pragma solidity ^0.5.5;

Welcome to the community @hibro :wave:

@hibro and @kate_king feel free to Introduce yourself here!

1 Like

Many thanks,once I have done this,how could I mine it out?and is there a total cap of the erc 721 token?
sorry for ask so many questions.

1 Like

Hi @kate_king,

To mint an ERC721 token using the code above, call mintWithTokenURI in Remix and provide the:

  • address for the token holder
  • tokenID (needs to be unique) and
  • tokenURI for the location of the metadata.

It looks as follows in Remix:

Please ask all the questions that you need. Questions and answers increase the knowledge of the entire community :smile:

so cool you are!!I will have a try later.
could I mine more than one token in one contract?

1 Like

Hi @kate_king,

There is no cap on how many tokens you can mint in the one ERC721 contract (tokenID is uint256). (Though you could add a cap if required, e.g. only 10,000)

1 Like

A post was split to a new topic: Upgradeable ERC721

A post was split to a new topic: Token for social campaigns to raise funds