Write ERC-721 Contract | WEMIX3.0 (2024)

It is possible to proceed an ERC-721Let's proceed with the contract deployment process in the order below. contract deployment test using Remix.

Caution

Once deployed contracts cannot be modified or deleted. Please write and deploy the necessary information in the code.

Let's proceed with the contract deployment process in the order below.

  • Step 1 : Access the Remix and Create a file

  • Step 2 : Write ERC-721 Contract

  • Step 3 : Move to SOLIDITY COMPILER tap, Set the version, and Compile

  • Step 4 : Set DEPLOY & RUN TRANSACTIONS

  • Step 5 : Set Gas fee and Sign at MetaMask

All examples are based on WEMIX3.0 Testnet.

Step 1 : Access the Remix and Create a file

Go to https://remix.ethereum.org.

Storage.sol, Owner.sol, and Ballot.sol are shown in the contracts directory. To create a new smart contract, select them to erase it and create a new file.

The figure below shows an example of creatingMyNFT.sol file in the contracts directory.

Step 2 : Write ERC-721 Contract

You can create the following ERC-721 contracts:

// SPDX-License-Identifier: MITpragma solidity ^0.8.10;import "@openzeppelin/contracts/token/ERC721/ERC721.sol";import "@openzeppelin/contracts/utils/Counters.sol";import "@openzeppelin/contracts/access/Ownable.sol";import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";contract MyNFT is ERC721URIStorage, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIds; constructor() public ERC721("Name", "Symbol") {} function mintNFT(address recipient, string memory tokenURI) public onlyOwner returns (uint256){  _tokenIds.increment(); uint256 newItemId = _tokenIds.current(); _mint(recipient, newItemId); _setTokenURI(newItemId, tokenURI); return newItemId; }}

You can specify the Token Name, Token Symbol that you want.

In the code below, you can enter the name and Symbol you want in the 'Name' and 'Symbol'.

 constructor() public ERC721("Name", "Symbol") {}

The figure below is an example of designating 'WMNFT', 'NFT'.

Step 3 : Move to SOLIDITY COMPILER tap, Set Version, and Compile

Once the code is written, compile after selecting the correct compiler version on the Solidity Compiler screen.

The compiler version of the example code provided is 0.8.10, and you must select the compiler version that is lower than that version.

Step 4 : Set DEPLOY & RUN TRANSACTIONS

On the Deploy & Run Transactions screen, select the environment to deploy smart contracts to test.

The figure below shows an example of deploying to WEMIX3.0 Testnet using the 'Injected Provider - Metamask' provided by Remix.

If ENVIRONEMNT is selected as 'Injected Provider - MetaMask', it is connected to MetaMask, which requires the network to be 'WEMIX_Testnet' connection.For more information about MetaMask connection, see Use MetaMask.

Step 5 : Set Gas Fee and Sign at MetaMask

After setting on the Deploy & Run Transactions, if you select 'deploy' button, the MetaMask pop-up appears. The screen showing 'Gas Fee' based on Ethereum will be displayed as shown below.

WEMIX has a different fee policy than Ethereum, so press the 'Site suggested' button to change t the Gas Fee.

Selecting 'Advanced' on the screen below allows the user to set 'Max priority fee (GWEI)' and 'Max fee (GWEI)' manually.

Currently, WEMIX is using a fixed 'Max priority fee (GWEI)' and the value is 100.

Max fee is a user-defined value and the minimum value is MaxPriorityFee+BASE_FEE.

BASE_FEE in WEMIX is variable according to EIP-1559. Therefore, for a transaction to be successfully created, it is recommended to set it as follows.

  1. Max base fee (GWEI) = 101

  2. Max priority fee (GWEI) = 100

Complete the Fee setup in the figure above and select 'Save' to be ready for deployment as shown below.

Select 'Confirm' in the figure above to proceed with the contract deployment.

If a green check mark appears at the bottom of the Remix screen as shown below, the delpoyment is completed normally.

Write ERC-721 Contract | WEMIX3.0 (2024)
Top Articles
Quantum Computing: Understanding Its Learning Path And Career Choices
What is a Wallet Address? | The Motley Fool
Pollen Count Los Altos
Instructional Resources
Napa Autocare Locator
B67 Bus Time
Becky Hudson Free
shopping.drugsourceinc.com/imperial | Imperial Health TX AZ
Herbalism Guide Tbc
Reddit Wisconsin Badgers Leaked
Michaels W2 Online
Eka Vore Portal
Cinebarre Drink Menu
Does Breckie Hill Have An Only Fans – Repeat Replay
Boston Gang Map
Elemental Showtimes Near Cinemark Flint West 14
Ahrefs Koopje
Jail View Sumter
Defending The Broken Isles
Cpt 90677 Reimbursem*nt 2023
Wood Chipper Rental Menards
Walgreens On Bingle And Long Point
Weather Underground Durham
Spirited Showtimes Near Marcus Twin Creek Cinema
Lesson 1.1 Practice B Geometry Answers
Insidious 5 Showtimes Near Cinemark Southland Center And Xd
Learn4Good Job Posting
Rlcraft Toolbelt
Khatrimmaza
Appleton Post Crescent Today's Obituaries
Skroch Funeral Home
1400 Kg To Lb
Ark Unlock All Skins Command
Texas Baseball Officially Releases 2023 Schedule
T&J Agnes Theaters
House Of Budz Michigan
Directions To 401 East Chestnut Street Louisville Kentucky
AI-Powered Free Online Flashcards for Studying | Kahoot!
Msnl Seeds
450 Miles Away From Me
3496 W Little League Dr San Bernardino Ca 92407
Gold Dipping Vat Terraria
2007 Jaguar XK Low Miles for sale - Palm Desert, CA - craigslist
Cnp Tx Venmo
Dwc Qme Database
2Nd Corinthians 5 Nlt
'The Nun II' Ending Explained: Does the Immortal Valak Die This Time?
Swsnj Warehousing Inc
Pas Bcbs Prefix
Craigslist Anc Ak
Lagrone Funeral Chapel & Crematory Obituaries
Latest Posts
Article information

Author: Mr. See Jast

Last Updated:

Views: 5951

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Mr. See Jast

Birthday: 1999-07-30

Address: 8409 Megan Mountain, New Mathew, MT 44997-8193

Phone: +5023589614038

Job: Chief Executive

Hobby: Leather crafting, Flag Football, Candle making, Flying, Poi, Gunsmithing, Swimming

Introduction: My name is Mr. See Jast, I am a open, jolly, gorgeous, courageous, inexpensive, friendly, homely person who loves writing and wants to share my knowledge and understanding with you.