
Crea tu propio NFT en R0ARchain



Prerequisites
Follow the two steps below before starting your R0AR NFT minting process:
-
MetaMask Installed & Connected to R0ARchain.
-
Test ETH (if using Testnet) from testnet.r0arfaucet.io.
Launch Remix IDE
Remix IDE es un entorno de desarrollo en línea para crear e implementar contratos inteligentes, y es totalmente compatible con R0ARchain.
Vaya al sitio web de Remix IDE.
Haga clic en el icono del Explorador de archivos y cree un nuevo archivo llamado MyNFT.sol.
Copy Solidity code into SimpleStorage.sol file
Copie y pegue el siguiente contrato NFT ERC-721:
// Identificador de licencia SPDX: MIT
solidez pragmática ^0.8.0;
importar "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
importar "@openzeppelin/contratos/acceso/Ownable.sol";
contrato MyNFT es ERC721URIStorage, Ownable {
uint256 privado _tokenIds;
constructor() ERC721("MiNFT", "MNFT") {}
función mintNFT(dirección del destinatario, cadena de memoria tokenURI) pública onlyOwner devuelve (uint256) {
_tokenIds++;
uint256 nuevoItemId = _tokenIds;
_mint(destinatario, newItemId);
_setTokenURI(newItemId, tokenURI);
devolver nuevoItemId;
}
}
Compile the NFT token Contract
The next step is compiling the ERC-721 contract with the following steps:
Click the Solidity Compiler tab.
Select Compiler Version 0.8.x.
Click Compile MyNFT.sol.
Deploy on R0ARchain
El token ERC-721 ahora se puede implementar en R0ARchain con estos pasos:
Vaya a Implementar y ejecutar transacciones.
En Entorno, seleccione Proveedor inyectado - MetaMask.
Elija R0AR Chain o R0AR Testnet en MetaMask.
Haga clic en Implementar y apruebe la transacción en MetaMask.
Mint an NFT
The NFT is now ready to be minted:
Under Deployed Contracts, expand your NFT contract.
Find mintNFT() and enter the recipient Address (your MetaMask address).
Token URI (a link to an NFT image, e.g., https://ipfs.io/ipfs/YOUR_HASH).
Click Transact and approve the transaction in MetaMask.
Ver su NFT
Comprueba tu NFT de R0ARchain:
Copia la dirección del contrato de Remix.
Utilice r0arscan.io o testnet.r0arscan.io para comprobar su NFT.
Para verlo en MetaMask, vaya a NFT, Importar NFT e ingrese su dirección de contrato y su ID de token.
Tu NFT ya está disponible en R0AR. Bienvenido al futuro de la creación y el intercambio de NFT.
Próximos pasos para los desarrolladores
Developers might be interested in following up the NFT mint with these steps:
-
Deploy on Mainnet: Use the R0AR Mainnet to mint real NFTs.
-
Bridge Tokens: Transfer ETH and R0AR tokens between Ethereum and R0ARchain.
-
List NFTs on Marketplaces: Integrate your NFTs with OpenSea or other marketplaces.
-
Smart Contract Development: Expand your NFT's functionality with features like crypto staking rewards, royalties, or DAO integration.
Finally, developers looking to interact with a community of leading builders and traders should join the R0AR DeFi community.
Preguntas frecuentes
ERC-721 es un estándar técnico para la creación de tokens no fungibles (NFT) en la blockchain de Ethereum. A diferencia de los tokens ERC-20 , cada token ERC-721 es único e indivisible, lo que los hace ideales para representar la propiedad de coleccionables digitales y otros activos únicos.
Un URI (Identificador Uniforme de Recursos) de token es un enlace que apunta a los metadatos asociados a un NFT. Estos metadatos suelen incluir información como el nombre, la descripción, la imagen y otros atributos relevantes del NFT.


