Ponimania Methods Countens Ethereum
In the quality of the ECR20 tokens, you, verbally, love about the various methods of the token on the other cryptocurrency. In this state, we will utter into the spreading storages and it is possible, how to decide which method is used to replace the tokens.
Standard token ERC-20
It is preceded by the special tokens in the specifics, which is important to harvest the standard ERC-20, which is the main ECR20 tokens. The ERC-20 Standard Decorates the Pravil Set for Creating and Directing Tsifrovi Activa, Volume Tipov Tipov, Such as ECR20.
The Methods of Obman
In ecosisteme ethereum access to a few methods of token:
1.
- ERC-721 NFT Standard with Loady fields : Some of the ERC-721 Realization includes add-on fields, which can be used for the chronicles of information replacing the token.
3.
ECR20 SPECIFIC TEOKEINS
How to a Token Ecr20, you, verbally, is pretended to be in Ponimania, how to sweep your token. Here are a few methods that can be used:
1.
* Create the copy of the ERC721
on Ethereum (for example, OpenzepelinErc721
).
* Install your Tokenuri
to indicate your orginal ECR20 token.
* Remove the new part -up to replace the token and initiate it with the help of your body token.
- ERC-20 SWAP : To blow the ECR20 token on the second ERC-20 token, Uspolza standard method, you need: you need:
* Create the copy of the erc20
on the ethereum (for example, the realization of the OpenzepelinErc20
).
* Install your red -out 'to indicate your orginal ECR20 token.
* Remove the new part -up to replace the token and initiate it with the help of your body token.
Primer code
To distribute this conception, let's disperse with the use of the Openzepelin
erc721:
Pragma Polidy ^0.8,0;
counteract mytoken {
// ECR20 TOKEN Standard Realization
Struct nft {
Bytes256;
}
Function Swap (NFT Memory NFT) PUBLIC {
// Install your own tokenuri to indicate your orginal token ecr20
nft.tokenuri = “0x …”;
// Remove the new part -up for the token replacement and initiate it with your delay your body token
Address Shapppedtokenaddress = 0x …;
// Calculation balance replacement token
Swaptoken (Shappuctkenaddress, nft.message);
}
Function Swaptoken (Address Shaptokenddress, Bytes Memorment Message) Public {
// Pierce up, li token replacement, and catch his balance
Hedged (msg.SEnder! = Address (0), “Obming is only for the ECR20 token”);
Uint256 Balance = Totalsupply ();
Swaptoken.Balanceof (msg.SEDER, 0, Shappdtokeddress);
}
Function Totalsupply () Public View Return (Uint25) {
APRACT 1;
}
}
`
In this primer function Swap
establishes the“ Tokenuri ”installment of NFT to indicate your ECR20 tokens and runs out a new variable to replace the token. Function `Swaptokeening runs, the tank replaces a replacement of his balance.
conclusion
Ponimania, how to sweep the tokens with a variety of methods can be indicated by the flag, but breaking it on a smaller sluggish rags and recognition with the standard ERC-20. Do not forget to make it all the best practitioners in the oblast and disabilities of the Intellectual Counterfeites Area Volodnia Tokkov in Your Ethereum projects.