1

Ann is installed

Compared to the last version, the new VERSION of EOS installation is so easy, almost one-click installation, CAN not help but crazy for the EOS development team, as a programmer, can understand how it is not easy, in one installation script, while taking into account the diversity of the operating system, to deal with the installation of various dependency libraries. Finally compiled more than ten executable programs.

Step 1 Download the EOS code

git clone https://github.com/EOSIO/eos --recursive
Copy the code

Step 2 Go to the EOS directory and execute the one-click install script

cd eos./eosio_build.sh
Copy the code

Execute the one-click setup script, which first collects information about the current computer and the installation status of various dependency packages.

Then you are asked if you want to install the missing dependency. Enter 1 and select Yes to proceed to the next step.

After confirmation, the installation and compilation times are relatively long, depending on the number of dependencies to be installed and the network speed and computer performance. It took me about 40 minutes to set up. Some software requires password input during the installation process, so take a look at it from time to time. Don’t walk away.

The setup script is so nice. There are reminders of progress throughout the compilation process.

After 100 percent, red EOSIO appears, and you’re done!

2

Start the local single-node test network

After a successful build installation, you can find programs in the Build directory, which are compiled executable programs. To start the node, nodeOS is required, so go to the nodeOS directory

✗ ➜ designed git: (master)pwd/ Users/Joe/Workspace/eos/build/designed ➜ designed git: (master) ✗ lsCMakeFiles cleos eosc eosio-launcherCTestTestfile.cmake cmake_install.cmake eosd keosdMakefile codegen eosio-abigen launcherabi_gen Eos-walletd eosio-applesedemo nodeos➜ programs git:(master) qualifycd✗ nodeos ➜ nodeos git: (master)pwd/ Users/Joe/Workspace/eos/build/designed/nodeos ➜ nodeos git: (master) ✗ lsCMakeFiles Makefile config.hppCTestTestfile.cmake cmake_install.cmake nodeosCopy the code

Run Nodes –help to view the help instructions.

To start the local single node, simply run the following command:

./nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::chain_api_plugin --plugin eosio::account_history_api_plugin
Copy the code

After the successful startup, we will see a message indicating the success of the creation of a new EOS blockchain, and the blockchain has started to generate blocks. The block production speed is roughly calculated, as the press conference said, about 0.5 seconds, because there is no transaction, so the current packaged block information is 0 TRXS.

We installed EOS DAWN3.0 and launched a native single-node EOS blockchain, then focused on familiarizing ourselves with EOS command-line programs and tools. All post-command programs and projects mentioned below were generated after EOS was successfully compiled and installed and can be found in the./build/programs directory.

3

Command line program

nodeos

This is the core daemon of EOS. The runtime can configure plug-ins for it through parameters. Let me give you an example:

./nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::chain_api_plugin --plugin eosio::account_history_api_plugin
Copy the code

— Plugin is the name of the plug-in to be configured.

We used this command to launch a native single-node EOS blockchain.

cleos

If NodeOS is the server, CleOS is the client.

You can see from their names:

nodeos = node eos  cleos = client eos

Cleos is a command-line tool for interacting with the REST apis provided by NodeOS.

Since it is a REST API, NodeOS must expose an IP address and port.

Cleos, as a client-side interaction tool, is the core and most commonly used part of EOS, so there are quite a few subcommands and parameters:

Run without any arguments, listing help documents:

➜ Cleos Git :(Master) Qualify./ CLEos ERROR: RequiredError: Subcommand required Command Line Interface to EOSIO Client Usage: ./cleos [OPTIONS] SUBCOMMAND Options: -h,--help Print thishelp message and exit
  -H,--host TEXT=localhost    the host where nodeos is running
  -p,--port UINT=8888         the port where nodeos is running
  --wallet-host TEXT=localhost
                              the host where keosd is running  --wallet-port UINT=8888     the port where keosd is running
  -v,--verbose                output verbose actions on errorSubcommands:
  version                     Retrieve version information  create                      Create various items, 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
Copy the code

As you can see, the subcommand has

  • Version: View the version number

  • Create: Creates various objects, such as account, key, and producer

  • Get: Gets information about the object created with create

  • Set: A write operation to the blockchain. Such as deploying smart contracts and modifying smart contracts.

  • This command can be used to transfer EOS between an account and an account.

  • Net: (Unknown for now)

  • Wallet: Interacts with a local wallet

  • Sign: To sign a transaction

  • Push: Sending various transactions onto the blockchain.

keosd

This is the DAEMON of the EOS Wallet. Once the process is started, we can interact with it using the CleOS Wallet above. You can create a wallet and import a key.

launcher

Launcher is used to create multi-node blockchains. Nodeos is used to create single-node blockchains. If you want to build a blockchain with multiple nodes, you can configure it with the launcher.

4

Command line tool

eosiocpp

Eosiocpp is related to smart contract code. After we write smart contract code in c++, we need to use eosiocpp to compile and transform the c++ code to generate ABI files.

HiBlock Blockchain community ** “Write Notes together” ** Partner — JC1991

The original article was first published on Bionhu.com

Course recommended

Course Topic: Unlocking the Mysteries of Digital Currency Trading — 2 lessons on building a digital currency exchange

Identify the qr code below to add wechat, reply “006” to register.

For more offline activities click “Read the original article”