Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to create and deploy your own EOS token

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to create and deploy your own EOS tokens, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Next we will figure out what EOS tokens are and how to create and deploy EOS tokens ourselves.

In contrast to Ethernet Square, EOS comes with a plug-and-play token intelligence contract. Etay Fong has the ERC20 intelligence contract, and EOS has the eosio.token intelligence contract. Eosio.token Smart contracts allow you to create your own tokens by providing a maximum supply of tokens and a written definition of tokens, by issuing tokens to your account and by transferring tokens between accounts. The EOS tokens on the EOS blockchain are issued using the same smart contract.

Cleos-- url https://api.main.alohaeos.com:443 get currency stats eosio.token EOS {"EOS": {"supply": "1003605574.9616 EOS", "max_supply": "10000000000.0000 EOS", "issuer": "eosio"}}

The url parameter specifies which node you are connected to. You can see more API nodes on the official website.

Install Cleos

Cleos is a command-line tool that interacts with REST API exposed by nodeos. We need cleos to run all the commands to interact with the EOS blockchain. You can use Docker,AWS Image or compile the source code to install cleos. The final result of the installation must be available on your terminal.

CleosERROR: RequiredError: Subcommand requiredCommand Line Interface to EOSIO ClientUsage: cleos [OPTIONS] SUBCOMMANDOptions:-hmermerlyhelp Print this help message and exit-- wallet-url TEXT= http://localhost:8900/ the http/https URL where nodeos is running-- wallet-url TEXT= http://localhost:8900/ the http/https URL where keosd is running-r -- header pass specific HTTP header Repeat this option to pass multiple headers-n print-request print HTTP request to STDERR talk print-response print HTTP response to STDERRSubcommands: version Retrieve version information create Create various items-- print-request print HTTP request to STDERR-- print-response print HTTP response to STDERRSubcommands: verbose output verbose actions on error On and off the blockchain get Retrieve various items and information from the blockchain set Set or update blockchain state transfer Transfer EOS from account to account net Interact with local p2p network connections wallet Interact with local wallet sign Sign a transaction push Push arbitrary transactions to the blockchain multisig Multisig contract commands system Send eosio.system contract action to the blockchain. Create a wallet

A wallet is a client that stores keys that may be associated with the permissions of one or more accounts. Ideally, wallets have locked (encrypted) and unlocked (decrypted) states protected by high-entropy passwords. The EOSIO/eos repository is bundled with a command-line interface client called cleos, which connects to a lite client named keosd, and they demonstrate this pattern.

Let's create something called "treasure".

Cleos wallet create-name treasureCreating wallet: treasureSave password to use in the future to unlock this wallet.Without password imported keys will not be retrievable. "PW5J2DTM7kpPaihUH35pLTJrvhjgZ11SY4FqxYbo6geWvEH4SNvMC"

You must keep your password in a secure place, because if it is lost, you cannot recover all the keys in your wallet.

Now we need to generate two pairs of keys for owner and activity permissions. After that, we import them into our wallets.

Cleos create key # ownerPrivate key: 5HsrZsLeUoDvBCFT2JSvgg3KrfwE7BXAJkUBSwnTwX27CgabumjPublic key: EOS8VMwRNWWHwov4vyzJiq9uTEyzcny8QKXv7CJxGQAwjSTncyv51cleos create key # activePrivate key: 5JtrJNbJPfzm8XPMddANGYT9yzaqo8gwTEpmSrgQNhtoPXL9YndPublic key: EOS8CCRKHAbhBim6LimdvhhzhEYiKNnLRhuMD1Zqx5Cut52moBRmHcleos wallet import 5HsrZsLeUoDvBCFT2JSvgg3KrfwE7BXAJkUBSwnTwX27Cgabumj-- name treasure # ownerimported private key for: EOS8VMwRNWWHwov4vyzJiq9uTEyzcny8QKXv7CJxGQAwjSTncyv51cleos wallet import 5JtrJNbJPfzm8XPMddANGYT9yzaqo8gwTEpmSrgQNhtoPXL9Ynd-- name treasure # ownerimported private key for: EOS8CCRKHAbhBim6LimdvhhzhEYiKNnLRhuMD1Zqx5Cut52moBRmH create an account

To do anything in the EOS blockchain, you need to have an account.

The account is a name that we can see stored in the block chain. It can be owned by one or more people, depending on the permission configuration. An account is required to transfer or push the transaction to the blockchain.

An account is essentially some public or private key and is a unique name. The key is stored in the wallet. The account is stored in the EOS block chain.

It's easy to create an account locally, just run the cleos create account command because you have a default eosio account, which is obviously not the case on Mainnet. To create an account on Mainnet, you need help from someone who already has it, such as zeos or eos-account-creator, which costs money. In addition, you can only create accounts with 12 symbols and only contain 1-5 digits in lowercase amurz. In my opinion, this is a very strict restriction. To get an account with a shorter name, you must bid. Considering that you can resell your EOS account, the amount of grabbing is huge. With all this in mind, we will use Testnet to save money and time.

EOS Jungle Tesnet is simulating the main network as much as possible. Go to jungle.cryptolions.io and click the Create Account link. It will ask for your account name and two keys. Use the previously generated public key.

After confirmation, the account will be set up.

Cleos-- url https://jungle.eosio.cr:443 get account ylvdeveloperpermissions: owner 1: 1 EOS8VMwRNWWHwov4vyzJiq9uTEyzcny8QKXv7CJxGQAwjSTncyv51 active 1: 1 EOS8CCRKHAbhBim6LimdvhhzhEYiKNnLRhuMD1Zqx5Cut52moBRmHmemory: quota: 161.4 KiB used: 3.365 KiB net bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) Used: 0 bytes available: 19.12 MiB limit: 19.12 MiB cpu bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 0 us available: 3.826 Sec limit: 3.826 sec producers:

Now we need to buy some RAM for our account because we are going to publish our smart contract. In the EOS blockchain, whales play bulls on the RAM market, which is another opportunity for rich people to speculate. Use EOS Jungle Testnet Faucet to put some EOS tokens into your account.

Then run the cleos system buyram command to purchase RAM with EOS tokens.

Cleos-url https://jungle.eosio.cr:443 system buyram ylvdeveloper ylvdeveloper "10 EOS" 3481816ms thread-0 main.cpp:429 create_action] result: {"binargs": "7055a5516d9576f47055a5516d9576f4a08601000000000004454f5300000000"} arg: {"code": "eosio", "action": "buyram", "args": {"payer": "ylvdeveloper", "receiver": "ylvdeveloper", "quant": "10.0000 EOS"} executed transaction: 8eb30f6cfced6845e02b134946c7b6d623558f0c1a5ceff135b7e98007da692f 128 bytes 5094 us# eosio

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report