ERC-20

Standards

परिभाषा

ERC-20 Ethereum पर fungible tokens के लिए सबसे popular standard है। यह standard methods की एक set define करता है (transfer, balanceOf, approve, transferFrom) जो सभी ERC-20 tokens को implement करने होते हैं। यह interoperability सुनिश्चित करता है - सभी wallets, exchanges और dApps एक ही interface से सभी ERC-20 tokens के साथ काम कर सकते हैं।

English version

ERC-20 is the most popular standard for fungible tokens on Ethereum. This standard defines a set of methods (transfer, balanceOf, approve, transferFrom) that all ERC-20 tokens must implement. This ensures interoperability - all wallets, exchanges and dApps can work with all ERC-20 tokens using the same interface.

Code Example

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address to, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address from, address to, uint256 amount) external returns (bool);

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

संबंधित शब्द

Solingo पर इस concept को practice करें

ERC-20 को interactive exercises और integrated IDE के साथ master करें।

मुफ्त में शुरू करें