Token

DeFi

परिभाषा

Token एक digital asset है जो smart contract द्वारा represent किया जाता है। Tokens fungible (ERC-20, सभी identical) या non-fungible (ERC-721/ERC-1155, unique) हो सकते हैं। Tokens currencies, voting rights, access permissions, या real-world assets को represent कर सकते हैं।

English version

Token is a digital asset represented by a smart contract. Tokens can be fungible (ERC-20, all identical) or non-fungible (ERC-721/ERC-1155, unique). Tokens can represent currencies, voting rights, access permissions, or real-world assets.

Code Example

// Token ERC-20 simple
contract SimpleToken {
    mapping(address => uint256) public balances;
    uint256 public totalSupply;

    function transfer(address to, uint256 amount) public returns (bool) {
        require(balances[msg.sender] >= amount);
        balances[msg.sender] -= amount;
        balances[to] += amount;
        return true;
    }
}

संबंधित शब्द

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

Token को interactive exercises और integrated IDE के साथ master करें।

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