ERC-721

Standards

Definition

Standard de token non-fongible (NFT) sur Ethereum. Chaque token a un identifiant unique et des propriétés distinctes. Fonctions principales : `ownerOf`, `balanceOf`, `transferFrom`, `approve`, `safeTransferFrom`. Utilisé pour l'art numérique, collectibles, immobilier virtuel, tickets.

English version

Non-fungible token (NFT) standard on Ethereum. Each token has unique ID and distinct properties. Used for digital art, collectibles, virtual real estate, tickets.

Exemple de Code

interface IERC721 {
    function balanceOf(address owner) external view returns (uint256);
    function ownerOf(uint256 tokenId) external view returns (address);
    function transferFrom(address from, address to, uint256 tokenId) external;
    function approve(address to, uint256 tokenId) external;
    function setApprovalForAll(address operator, bool approved) external;

    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
}

Pratique ce concept sur Solingo

Maîtrise ERC-721 avec des exercices interactifs et un IDE intégré.

Commencer gratuitement