pandora jewelry wholesale usa Understand ERC20 token contract

pandora jewelry wholesale usa

1 thought on “pandora jewelry wholesale usa Understand ERC20 token contract”

  1. wholesale jewelry cleaner cloth The ERC20 tokens can be said to hear a lot of nouns in issuing coins. When it comes to issuing coins, you will think of this contract. In this article, we will talk about how to understand the ERC20 token contract.

    The ERC20 standard can refer to the official documentation. It can be said that the interface of the ERC20 described by solidity is more abstract.

    ERC-20 was originally an attempt to provide a common standard for features and interfaces for the token contract on Ethereum, and it has now proven to be very successful. Essence There are many benefits of ERC-20, including allowing wallets to display hundreds of account balances with different Token; creating a trading tool, you only need to provide the address of the Token contract to include more token in the table. There are many benefits to creating ERC-20 compatible token, so that today, few other Token contracts are created in other ways.

    The debate in the "token (token) contract. In essence, a token contract is a smart contract that contains an account address and its balance. The account balance represents a value defined by a contract founder: a token contract may use the balance to indicate physical objects, or to represent another monetary value, and it can also represent the reputation of the holder. Units with balance are usually called token.

    Is when the Token was transferred from one account to another account, the tokens updated the balance of the two accounts. For example, from 0x2299 ... 3AB7 to 0x1F59 ... 3492 10 Token will cause the balance list as shown in the figure below:

    If the allowing the token contract, there are two solutions to change the total number of Token. The total number of Token can be increased by casting a new Token. For example, 100 token to the address 0x4ba5… AE22 balance is changed as shown in the figure below:

    can also reduce the total amount of token through "destroy", for example, 0x4919 ... 413D destroyed 50 token will be destroyed will The balance of the balance is as follows:

    . Another way to destroy the Token is to send the Token to an address that is not creating a private key. Generally speaking, it is 0 address. This will make these Token unavailable. In this regard, it has the same effect as destroying the token, but it does not reduce the total number of Token. For example, 0x93F1 ... 1B09 destroyed 50 token in this way will cause the balance as shown in the figure below:

    simple tokens to save the above information in a mapping from address to balance. When more complex scenarios appear, such as dividends, alternative structures or supplementary structures are often stronger. However, regardless of the details of the operation, the token balance of the external visible to the outside is always like the icon above.

    ERC20 contract is defined through the address of the contract and the total number of token available, but it usually provides some optional items, which also provides users with more details. Such as Token's name, symbols, decimal bits, and so on.

    INE in -depth understanding, it must be clear: the token contract does not have a centralized registration office, so it cannot guarantee the uniqueness of specific names and symbols. Once you create a token contract, you should apply to add it to the public site, such as Etherscan, and. Of course, to ensure that instructions on the website, you can maximize the opportunity to be accepted.

    The name of the tokens is the complete name of the tokens, such as "My Token". The length of the name is not limited, but if it is too long, it may be incomplete in the application of some wallets, so it is best to keep the name simple.

    The symbols of the tokens are the symbols of the tokens, such as "MyT". Roughly equivalent to automatic stock market. Although there is no length limit, it is usually three or four character lengths.

    The concept of decimal digits is usually easy to confuse, and it is easy to understand through explanation. The small number represents the segmentation of a token. The value of the decimal position from 0 (completely incurable) to 18 (almost continuous), or even higher. Technically, the number of the decimal position is the number that follows the decimal point on the screen. The significance of the presence is that Ethereum does not handle decimal, and all digital values ​​are used as an integer process.

    The total issue volume is the final definition of the ERC20 token contract, and it is the only mandatory parameter. Although there is no clear specification in the ERC20 standard, the definition of the total circulation is very simple: the total circulation is equal to the sum of all balances. The total circulation has been given in the example above, so there is no need to repeat it.

Leave a Comment